Asked 7 years ago
21 Feb 2017
Views 15688
jessica

jessica posted

django admin error - no such table : auth_user

http://server.com/admin/login/?next=/admin/

get the error - no such table : auth_user


already tried to create superuser

py -3 manage.py createsuperuser


but get again error .

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





Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

sometime after creating models , one forget to sync with database .

so try to run migration add models to your database.


python3 manage.py makemigrations
python3 manage.py migrate


or

py -3 manage.py makemigrations
py -3 manage.py migrate


or try to migrate without makemigrations

py -3 manage.py migrate





now try to run server and browse admin . login with entered username / password

run server by

py manage.py runserver

Post Answer