
The application is a model of a network for selling goods. The network is a hierarchical structure of 3 levels:
- Factory;
- Retail network;
- Individual entrepreneur.
Each link in the network refers to only one equipment supplier (not necessarily the previous one in the hierarchy). It is important to note that the hierarchy level is determined not by the name of the link, but by its relationship to other elements of the network, i.e. The plant is always at level 0, and if the retail network relates directly to the plant, bypassing other links, its level is 1.
Follow these steps:
- Clone repo:
https://github.com/ShadeSWD/logistics.git
- Install dependencies::
cd price-maker poetry init
- Setup environment: use template in .env.sample
- Perform migrations:
python manage.py migrate
- Run app:
python manage.py runserver
- Open app: The app is ready to process requests
- Create superuser:
python manage.py createsuperuser
- Create vendor: Now, when you created a superuser, you can log in and create vendors at <your_host>/users/
To load data from fixtures run:
manage.py loaddata fixtures/vendors_data.json
To dump data from fixtures run:
manage.py dumpdata --indent=2 users > fixtures/vendors_data.json
Docs are available at:
- <your_host>/swagger/
- <your_host>/redoc/

Leave a Reply