Pridaj package do projektu
poetry add <package>
...
poetry add django
Nainstaluj dependencies
poetry install
Sprav migracie
python manage.py migrate
Aktivuje sa virtual environment
poetry shell
Jednorazove spustenie prikazu pod virtual environmentom
poetry run <command>
Vytvorenie projektu
django-admin startproject <mysite>
Vytvorenie aplikacie
python manage.py startapp <appname>
Spustenie serveru
python manage.py runserver
Vytvorenie migracnych suborov
python manage.py makemigrations ?<appname>
Migracia db na zaklade migracnych suborov
python manage.py migrate ?<appname>
Revert migracie
python manage.py migrate <appname> <id_migracie>
Revert migracie az na inicialny stav
python manage.py migrate <appname> zero
Zobrazenie aplikovanych migracii
python manage.py showmigrations
Vytvorenie super usera (admina)
python manage.py createsuperuser
Dump databazy do .json
suboru
python manage.py dumpdata viewer --output fixtures.json
Nacitanie databazy z .json
suboru
python manage.py loaddata fixtures.json
Interaktivny rezim, ktory ma naloadovane django prostredie
python manage.py shell