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
al...@bright-green.com - http://bright-green.com
I've tried using ForeignKey also. It gives me different problems. See
http://groups.google.com/group/django-users/browse_thread/thread/ad493aadb30b3cde/
I'd love to get some more input.
Thanks,
Grant