Error: "relation "django_comments" does not exist"
Asked Answered
C

2

6

I'm trying to delete users from the admin and get this error:

DatabaseError at /admin/users/neverlateuser/
    relation "django_comments" does not exist
    LINE 1: ..._admin", "users_neverlateuser"."date_joined" FROM "django_co...

but I don't have the comments installed, I don't have django.contrib.comments. I get this error only on the live server but not on the local host- there I can delete users with no problem. Where is the problem?

Calesta answered 18/7, 2013 at 7:30 Comment(1)
Did you able to resolve this issue. I am facing the exact problem.Formaldehyde
L
3

I fixed it by adding django.contrib.comments to my INSTALLED_APPS. I don't think this is a must, but I guess I used comments before and removed it later from the project (long-term project). So add it and run syncdb plus migrate.

Lapidify answered 21/8, 2014 at 8:39 Comment(0)
W
0

may be the owner of the table is changed on the production server. if you are using postgresql , you can edit the table with pgadmin3 to see who is the actual owner of the table. the same thing exit with mysql too.

Womanlike answered 18/7, 2013 at 7:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.