Skip to content

hillel-i-python-pro-i-2022-08-26/homework__django__V.Marakhovskyi

Repository files navigation

Homework # 20. (Middlewares)


Main workflow IDE REPO DJANGO DB

👨‍💻 Homework

Updating existed Django project with custom logging middleware. *Only authorized users can access to "Contact list" page and view action statistic for dedicated user.

🎬 Run

Run an application from 0.

make d-homework-i-run

🛣️ Install pre-commit and dependencies:

make init-dev

🧽🪣 Purge

Delete all created artifacts from run.

make d-homework-i-purge

♻️ Make migrations

Create a migrations

make migrations

💾 Migrate

Apply a migration

make migrate

📗 Command: generate contacts

Default value - 50 contacts

make generate-contacts

For custom generation with desired amount use a terminal command:

python manage.py generate_contacts --amount <desired qtty>

📕 Command: delete contacts

Deleting all auto-generated contacts

make delete-contacts

🦸 Create a superuser

login: admin | password: admin123

make init-dev-i-create-superuser