Store shop. The project for study Django
Stepik | Backend development on Django: from scratch to a specialist
❗Note: Project not supported❗
Features • Tech stack • How To Use • Additional material • GitHub Pages
- Registration new user
- Verification with e-mail
- Authorisation
- Also, authorisation with GitHub account
- Change profile settings
- Add goods into cart
- Fake buying
- History orders
To clone and run this project, you'll need:
Step-by-step commands or use Docker
commands
-
Firstly clone repo
git clone git@github.com:mrKazzila/mini_online_store.git
-
Copy an example .env file because the real one is git ignored
cp env/.env.example env/.env.project
-
Add env file for db
touch env/.env.db && echo -e \ "POSTGRES_DB=store_db\nPOSTGRES_USER=store_username\nPOSTGRES_PASSWORD=store_password" > env/.env.db
-
Settings Poetry
poetry config virtualenvs.in-project true
-
Activate venv
poetry shell
-
Install packages
poetry install
-
Install pre-commit
pre-commit install
-
Move to app dir
cd app
-
Run project dependencies, migrations, fill the database with the fixture data etc
python manage.py migrate python manage.py loaddata <path_to_fixture_files> python manage.py runserver
-
Run Redis Server
redis-server
-
Run Celery
celery -A config worker --loglevel=INFO
-
Test purchase webhook
stripe listen --forward-to 127.0.0.1:8000/webhook/stripe/
-
Start yapf (manual)
yapf --style=.style.yapf -ir -vv app/
-
Start pre-commit (manual)
pre-commit run --all-files
-
Start bandit (manual)
bandit -c style/bandit.yaml -r app/ -f json -o bandit_report.json
how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-22-04