#8562: OneToOnes + primary_key = True ... fails in Admin
--------------------------------------+-------------------------------------
Reporter: magneto | Owner: nobody
Status: new | Milestone:
Component: Admin interface | Version: SVN
Resolution: | Keywords: admin onetoone
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
--------------------------------------+-------------------------------------
Comment (by magneto):
An even better solution that seems to solve the most of the ticket.
The method is to think of '''OneToOne+Primary''' AND
'''ForiegnKey+primary+unique''' as equivalent as Hidden AutoFields in the
Inline cases.
This still does not solve the Add not saving the OneToOne (or other Inline
primary key type) that did not have its defaults changed (but the fields
are not required). Beginning to think that a OneToOne with no required
fields, perhaps should not be saved. It does leave a hole in the
{{{
my_obj.my_oneto_one
}}}
raising a "DoesNotExist" error in the reverse relations, when it probably
should return None if one allows the above behavior in the Admin.
i.e. a simple {{{if my_obj.my_oneto_one: ... }}} instead of
{{{try/except}}} makes more sense.
.. but i'll leave that to the rest of y'all.
--
Ticket URL: <http://code.djangoproject.com/ticket/8562#comment:5>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---