Django: no such table: django_session
After made any changes in code, run the following commands
manage.py makemigrations
manage.py migrate
it worked for me.
It could be that the server uses a different working directory than the manage.py
command. Since you provide a relative path to the sqlite database, it is created in the working directory. Try it with an absolute path, e.g.:
'NAME': '/tmp/mysite.sqlite3',
Remember that you have to either run ./manage.py syncdb
again or copy your current database with the existing tables to /tmp
.
If it resolves the error message, you can look for a better place than /tmp
:-)
run this in command shell:
python manage.py migrate
This fixed for me.