I created a data model in Django which has many to one relation (N topics to 1 user) like this:
from django.db import models from django.contrib.auth.models import User
# Create your models here.
class Topic(models.Model):
content = models.CharField(max_length=2000)
pub_date = models.DateTimeField('date published')
author = models.ForeignKey(User)
When I try to load the data model in the admin page, I get this error:
Exception Value:
no such column: talk_comment.author_id
Did I miss something in the data model?
Thanks.
You forgot to actually modify/create the tables in database (manually, with South
or manage.py syncdb
).