django create superuser failed

After obtaining the above screen naturally want to be able to log on to operate, will need to create a user, but in execution python manage.py createsuperuser Times the following error:

return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: auth_user

As can be seen from the error prompt corresponding data table does not exist, because the model is actually created not migrated to the database, then only you need to do python manage.py makemigrations

Then execute python manage.py migrate

Finally, execute python manage.py createsuperuser it.

Guess you like

Origin blog.csdn.net/haiziccc/article/details/91419915