Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 1 KB

django.md

File metadata and controls

73 lines (49 loc) · 1 KB

Django commands

  • Create Django project

    django-admin startproject <projectname> .
  • Create Django app

    python manage.py startapp <appname>
  • Run Django server

    python manage.py runserver
  • Show migrations

    python manage.py showmigrations
  • Create migrations

    python manage.py makemigrations
  • Apply migrations

    python manage.py migrate
  • Create superuser for Django admin

    python manage.py createsuperuser
  • Create superuser for Django admin more simple

    python manage.py createsuperuser --username <admin_test> --email <[email protected]>
  • Run tests

    python manage.py test
  • Run tests with failfast

    python manage.py test --failfast
  • Go to the Shell

    python manage.py shell
  • Go to the Shell plus of django-extensions package

    python manage.py shell_plus