On 9/26/07, Steve Potter <[EMAIL PROTECTED]> wrote:
> user = models.ForeignKey(auth.models.User)
>
> It appears that the django.contrib.auth is missing the models
> attribute.

No, it's not. Most likely there's a bad import statement in your
models file, or no import statement, or you've got two things both
trying to import a module named 'auth' and the other one is "winning".

The best practice for your case is to have this at the top of your models file:

from django.contrib.auth.models import User

and to write the foreign key like so:

user = models.ForeignKey(User)


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to