On Jun 9, 10:07 pm, adelaide_mike <mike.ro...@internode.on.net> wrote: > Hi > I need to store additional info about my users. The following in > models.py raises a name error due to User. Have tried auth_users and > Users as well. No joy. > > class User_settings(models.Model): > user = models.ForeignKey(User,unique=True) > current_date = models.DateField(null=True, blank=True) > current_source = models.ForeignKey(Source) > > What is the correct name for the built-in user table? > > Mike
As with any name in Python, you need to import it before you can use it. from django.contrib.auth.models import User Or, you can use the string format - ForeignKey('auth.User') -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---