How do I create a superuser account in Django 1.9.6 How do I create a superuser account in Django 1.9.6 python python

How do I create a superuser account in Django 1.9.6


I think you want to run these commands:

python manage.py makemigrations creates migration files based on your models

python manage.py migrate will create the tables in your db based on the migration files created

(see docs for more details on database migrations)

python manage.py createsuperuser will create a superuser for your application in the database (docs)


first run

$ django-admin startproject mysite 

in cmd prompt,then apply migration by

cd mysite

mysite:

python manage.py makemigrations

then

python manage.py migrate

after that

python manage.py createsuperuser