M. Alex
M. Alex

Reputation: 713

Unable to use Django Authentication System in Deployment

I have created a Django app which uses Django's builtin authentification system which works normally till I deploy it in a production environment.

I now got this error whenever I try to login or register a user: ProgrammingError at /login relation "auth_user" does not exist LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user...

All other aspects of my web app work correctly and so I'm unsure what to do.

Upvotes: 0

Views: 51

Answers (2)

Nikki Nikhil
Nikki Nikhil

Reputation: 36

use both python manage.py makemigrations python manage.py migrate, and checkout in database django_session should be there, if not delete migrations file in migrations folder and do above 2 steps again.

Upvotes: 0

Clarity
Clarity

Reputation: 10873

You'll need to run python migrate [appName] in production to create the necessary tables.

Upvotes: 1

Related Questions