A Django app to display orders from Shopify and create new orders.
This project uses poetry for dependecy management. Install with:
python3 -m pip install --user --upgrade poetry
poetry shell
Install only production dependencies:
poetry install --no-dev
poetry shell
Run migrations and create a superuser:
python manage.py migrate
python manage.py createsuperuser
Create a .env
file in the project base directory with at least the following values filled out:
DJANGO_SECRET_KEY
DJANGO_ALLOWED_HOSTS
SHOPIFY_ORDERS_URL
SHOPIFY_API_KEY
SHOPIFY_PASSWORD
Start the app using the script inside the poetry env:
./scripts/start.sh
Note: Serving static files will require traefik/nginx and whitenoise which are not currently set up.
Install all dependencies:
poetry install
poetry shell
Run migrations and create a superuser:
python manage.py migrate
python manage.py createsuperuser
Start the debug server:
python manage.py runserver
Follow the development installation guide above, activate a shell, then set up pre-commit:
poetry shell
pre-commit install --install-hooks
Run unit tests:
pytest --cov
- Configure Django SSL settings and run
manage.py check --deploy
- Refactor
OrderListView
to use a background task queue for accessing the Shopify API - Set up Traefik/Whitenoise to serve static files and as a load balancer
- Update
OrderCreateForm
andOrderCreateView
to allow for multiple line items