PROJECTS NOTES HOME

Django commands

django-admin startproject mysite
python manage.py startapp appname
python manage.py createsuperuser
python manage.py makemigrations
python manage.py migrate
python manage.py migrate appname
python manage.py runserver
python manage.py shell
# If you have deleted migrations folder or it's content, running makemigrations
# or migrate will not do anything. First need to run this:
# https://stackoverflow.com/questions/34548768/no-such-table-exception
python manage.py migrate --run-syncdb
python manage.py inspectdb
python manage.py migrate --fake app_name zero