On Thu, 2008-07-03 at 05:55 -0700, Aldo wrote:
[...]
> I have several problems on the admin site with this model :
> -I cannot change 'married_to' field after object creation.

Pretty much no work has been done on OneToOneField handling in existing
(trunk) admin, since it's not worth it with newforms-admin around the
corner. So I'm personally not going to worry too much about things like
this with existing admin.

> -The OneToOne relationships is not symmetrical as it should be.

Well, "as it should be" is a bit of a loaded term. It's not an inherit
property of one-to-one relations that they are symmetrical. Django
happens to have "symmetry by default" for many-to-many, but it's not
clear to me that that should carry over to one-to-one.

> When I
> create Paul married_to Laura, Laura is not automatically married_to
> Paul.
> 
> I am using today 0.97 trunk SVN version.
> 
> Can anybody help me with this model or propose another one ?

Try ForeignKey(unique=True) and see if that works for you. The only
difference is that the reverse relation returns a list (of one item),
rather than an instance. There's a lot more experience with
ForeignKey('self') than OneToOne('self') -- I've never really considered
doing the latter, so it's not too surprising there might be some bugs
there.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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