On 9/26/06, gkelly <[EMAIL PROTECTED]> wrote: > > I have the following model and view: > > http://pastebin.ca/182428 > > If I manually edit > /usr/local/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/contrib/auth/models.py > and change User.__str__(self) to return a string like > 'TEST'+self.username, then 'testuser' above will become 'TESTtestuser'. > > So it appears pk_val is user.username and not user.id?? What's going on > here?
Not sure if this is your problem, but the documentation for OneToOneFields says, "we don't recommend you use them." http://www.djangoproject.com/documentation/model_api/#one-to-one-relationships One of my applications has a UserProfile object. After trying OneToOneFields and not quite getting the results I wanted, I settled on using a ForeignKey instead of a OneToOne, and it works. Hope that helps, Alan. > > > > > -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---