简体   繁体   中英

Django error when creating superuser django.db.utils.OperationalError: no such table: auth_user

I am pretty new to django. All of a sudden I ran into this error when trying to create a superuser from windows command prompt using

python manage.py createsuperuser

When I enter it, I get this error

django.db.utils.OperationalError: no such table: auth_user

I created a brand new virtual environment and project but I keep getting this issue. Has anyone seen this before?

As the error shows, there is no such table auth_user .

auth_user is the table which will store the user information but that has not yet been created in the database.

To do so, run the command;

python manage.py migrate

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM