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
I created a model file for my app and then did several sqlall
as I refined my tables. One of the changes I made was I set primary_key=True
to one of my fields. At the end called for syncdb
. Added a dummy value and and tried to access it with User.objects.all()
, User
being my model class. Although this worked fine, this error came up while printing the list returned by the all()
call. It read DatabaseError: (1054, "Unknown column 'polls_user.id' in 'field list'")
Surprisingly, I tried and could get it resolved with another call to syncdb
. I remember not having seen the id column in the table at any time throughout the exercise when I checked it through the mysql command line client.