Forums

Getting a 500 server error due to jango.db.utils.OperationalError: no such column

Hi there,

I've added a new method to my model and deployed all the changes to python anywhere.

The problem is that now I can't access any page (error 500) that is generated with user data. I even can't delete a user from the admin (it gives me a 500 error).

I've checked the error log and get this for the new method I added:

jango.db.utils.OperationalError: no such column

I've tried to run python manage.py makemigrations and then I get this error:

from django.contrib.auth.views import LoginView, LogoutView ImportError: cannot import name 'LoginView'

What can I do to solve it?

Thank you.

sounds like you first need to solve the import error, and then afterwards run makemigrations and then run migrate.

Go to the file that is showing that error, and try to fix that error. For example, this could happen if say a different version of django doesn't have LoginView at django.contrib.auth.views

Thank you.

I'm using django 1.11 and before making any changes in the model the app worked perfectly.

I've searched that error in Google and it only happens when using django < 1.11. which it not my case.

This is really weird. I actually don't know what to do since I didn't get this error before.

Solved it!

I thought I had django 1.11 and I diddn't.

Thank you for the answer.