No idea why this error is popping up. Here are the models I created -
from django.db import models
from django.contrib.auth.models import User
class Shows(m
This is quite an old question but you might find the below useful anyway:
Check the database, you're most likely missing the show_id in the appname_usershow table.
This could occur when you change or add a field but you forget running migration.
OR
When you're accessing a non managed table and you're trying to add a ForeignKey to your model.
Following the example above:
class UserShow(models.Model):
# some attributes ...
show = models.ForeignKey(Show, models.DO_NOTHING)
class Meta:
managed = False
db_table = 'appname_departments'