Reputation: 439
So I ran my program based on from here and It worked without any error. I go to to /admin. I login. So far everything is good. Then when it loads I get this:
I checked the traceback (which is really long) and none of includes my code. It doesn't tell me what part of the code this error is occurring in so I don't know how to approach this. Please explain what this is, why this is happening, and how I can fix it.
If you need any part of my code, just ask in comments because I don't know where this is happening.
Upvotes: 10
Views: 38075
Reputation: 1
Just delete the sqlite database and migrations files then run this
python manage.py makemigrations python manage.py migrate
Upvotes: -1
Reputation: 1
use these commands
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py runserver
Upvotes: -1
Reputation: 1
Hi In Django Administration :check if the user has the right permission, it should work
Upvotes: -1
Reputation: 577
this is the problem with migration just type the following command:-
python manage.py migrate
Upvotes: 0
Reputation: 21
Install latest django version
$ pip3 install django==2.2.8
$ python3 manage.py makemigrations
$ python manage.py migrate
then reload page in browser
Upvotes: 0
Reputation: 11
to achieve the same
make the migrations by typing the following command
1. python3 manage.py makemigrations
2. python3 manage.py migrate
Upvotes: 1
Reputation: 21
Use pip install django==2.1.5
If the problem persists,
Use python manage.py migrate --run-syncdb
Upvotes: 2
Reputation: 1
yes, that was fault of django version ,when i installed django==2.1.5 that problem was solved.
Upvotes: 0
Reputation: 4154
If you still get error after you lunched
python manage.py migrate
and for every change you made on models
python manage.py makemigrations
python manage.py migrate
Then check if you have Django version older than 2.1.5, because this latter version fixes a bug returning "OperationalError>no such table" when adding an object to your database as superuser. So try to
pip install Django==2.1.5
However, you will have to re-write your project anew.
Upvotes: -1
Reputation: 69
Till the time they don't debug this issue with Django and Sqlite3 use the older versions of Django You may consider using version 1.10.5(using command pip install --upgrade django==1.10.5)
Upvotes: 0
Reputation: 174696
You need to run migrate command in-order to force django to create auth tables.
python manage.py migrate
Then for any change you made on models, don't forget to run these two commands.
python manage.py makemigrations
python manage.py migrate
Upvotes: 24