#8674 closed (duplicate)
OneToOne Fields display problem in admin gui
| Reported by: | nekron | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Keywords: | OneToOne | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
This bug is for SVN 8696.
I created the following simple OneToOneField model:
class Man(models.Model):
name = models.CharField(max_length=10)
def __unicode__(self):
return self.name
class Woman(models.Model):
name = models.CharField(max_length=10)
man = models.OneToOneField(Man)
def __unicode__(self):
return self.name
e.g., a woman is married to one man.
If I register both models with admin.site.register and start editing them via administration I can add woman to man 1:1 relations, however if I start editing my womens objects again I get "--------" instead of my related man object shown in the select box. Within the database the OneToOneField data looks ok.
Note:
See TracTickets
for help on using tickets.
This is covered by #8562, I believe. There's a patch on that ticket you could try to verify.