KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Consider the following django model from django.db import models from django.contrib import auth class Topic(models.Model): user = models.ForeignKey('auth.models.User') name = models.CharField(max_length = NameMaxLength , unique = True) version_number = models.IntegerField(default = 0) created_at = models.DateTimeField(auto_now_add = True) modified_at = models.DateTimeField(auto_now = True) update_frequency = models.IntegerField() This model does not validate even after installing the auth_user table. In [3]: auth.models.User.objects.all() Out[3]: [<User: admin>] The above statement is from django-admin shell $ python manage.py syncdb Error: One or more models did not validate: topic: 'user' has a relation with model auth.models.User, which has either not been installed or is abstract. I am using django v1.0.4 with pinax 0.7.2 on ubuntu 11.04 , with sqlite3 database The following Questions did not help much: Foreign key to User table in django How do I create a foreign key to the User table in Django?
Tags (comma-separated)
Save Edits
Cancel