install
pyenv local 3.10.3
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip && pip install pip-tools
pip-sync requirements.txt dev_requirements.txt
how to add deps
- add to requirements.in with or without version
- run
pip-compile
or for devpip-compile dev_requirements.in
- add version to requirements.in if omitted in 1.
- run
pip-sync
or for devpip-sync requirements.txt dev_requirements.txt
useful commands
project init django-admin startproject django_project .
app init python manage.py startapp books
add new migrations python manage.py makemigrations books
exec migrate python manage.py migrate
create su python manage.py createsuperuser
test python manage.py test
run python manage.py runserver
python manage.py collectstatic