This project implements an order system using python django
Author: pixelead0 email: [email protected]
- Customer
- Supplier
- Product
- SuppliersProducts
- DistributionCenter
- BranchOffice
- AssociatedCompany.
Python 3.8
Django 1.1.2
Docker
PostgreSQL 11
- Before beginning any work, always pull latest version of
dev
branch. - Create a new branch from
master
. There are two formats for branch names:github_username/description_of_feature/trello_id
Use this format when an associated Trello ticket exists for this particular feature that you are working on.github_username/description_of_feature
Use this format where there is not an associated Trello ticket for the particular feature that you are working on. Some example branch names:
pixelead0/changes-button-colors
pixelead0/fixes-login-error/xeuoiu37893
- Do your work in the new feature branch that you made.
- When the branch is ready, rebase all your changes into one commit.
- Make sure commit has a descriptive title in all title case.
For example:
Changes Button Colors
- Add the bottom of each commit message, if there is a trello ticket,
post the ticket url like this:
Reference: https://trello.com/blah/blah/113873
- Make sure commit has a descriptive title in all title case.
For example:
- Push your branch up to Github
- Make a new Pull Request from your feature branch to the
master
branch. Never push directly into themaster
branch.- In the PR, add
pixelead0
as a reviewer
- In the PR, add
- Notify
pixelead0
that PR is ready for review.
You will probably need to build some files for your IDE. These will only be accessed by the IDE. These are not used by the actual app server. The app server uses the files which are inside the docker container.
On your host machine, setup python environment:
# FROM HOST
rm -fr ./venv
python3.8 -m venv venv
./venv/bin/pip3 install -r ./api/requirements.txt
Clone the repository
git clone [email protected]:pixelead0/django_order_system.git
Copy the configuration files.
sh config-init.sh
Run docker-compose to start the containers:
docker-compose up
Reset own files user
sudo chown -R $USER
Export local database to fixtures
Add new fixture to generate_fixtures.sh
file and reganerate the fixtures
sh generate_fixtures.sh
Load data to local database
Edit api/load_fixtures.sh
and rebuild api container.
docker-compose --build api
Reload data to local database without build container
Edit api/load_fixtures.sh
and execute:
sh reload_fixtures.sh
docker-compose rm -fsa
docker-compose up
docker-compose restart api