stmfunk
stmfunk

Reputation: 683

Django: no such table: django_session when using with postgres

I'm building a blog with Django and I have configured my server with nginx and uwsgi. Everything works fine on the test server from manage.py but when I try to access it externally I get

OperationalError at /admin/
no such table: django_session

when I try to login to the admin console. Before this I was getting a similiar error but with auth_user instead of django_session. I have configured the server using postgres and when I log in using the blogs user to the database all the tables appear to be there. I noticed this line on the error page /srv/blogenv/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py which I thought to be strange given that the database is in postgres. I tried running syncdb but it returned that there were unmigrated changes and performing makemigrations and migrate didn't fix the problem.

Upvotes: 2

Views: 7464

Answers (1)

stmfunk
stmfunk

Reputation: 683

So I managed to solve the problem by deleting the existing database and migrating again.

Upvotes: 8

Related Questions