The Web part of XShop's system.
- Install Python 3.8.6 (recommendation: using Pyenv)
- Install docker
- Install docker-compose
- Install Poetry
- clone the project using git
cd
into the project- copy
.env.example
to.env
, and change values (if needed) - run
poetry install
to install dependencies (which will create a virtualenv automatically) - run
poetry shell
to activate the virtual environment - run
docker-compose up
to run the db container (and leave it running) - open another terminal inside the project's folder and activate the virtualenv using
poetry shell
again - apply the migrations by issueing
./manage.py migrate
- then run
./manage.py runserver
to run the development server - Visit the project on this URL: localhost:8000
- You should see the project running without any problems
- If you face any problem doing the above steps ask for help
- see how to contribute here
- Think about your task, and gather information before you code
- Ask the team for help if you can't get something right
- write code for your task
- write tests to validate your code
- run
./manage.py test
to run your tests - run
flake8
to make sure your code style is ok - push and make a Pull Request
- Wait for code review
├── api.http API specs through examples directly from vscode, This extension needed
├── docker-compose.yml local dev containers specs
├── manage.py
├── poetry.lock poetry lock file which contains project's dependencies
├── pyproject.toml python's project specs new standard
├── README.md This file
├── Procfile Deployment to heroku
├── project project dir created by django-admin
│ ├── settings.py Project settings
│ ├── urls.py Project URL Paths
├── static css/js/img files that help with the design
├── templates HTML templates. A folder for each app inside the project
└── xshop Container of all django apps in the project
├── core Core app that contains essential functionalities like admin edits and management commands
├── invoices Every thing related to invoices should be here
├── orders orders-related logic
├── pages static/semi-static pages like (about, home, contact)...etc
├── products products-related code
├── shops shops-related code (models, views, apis, etc..)
├── users users-related logic (models, views, api, etc..)
└── utils project-wide utilities
Please Note that each app contains:
- an api package which contains api-related stuff: serializers, views, and urls
- a tests packages that contains:
- a test_api package which contains
- a test_views module for testing api views
- a test_serializers module for testing api serializers
- test_views module for testing app's ordinary views
- test_models for testing app's models
- a test_api package which contains