Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#8674 closed (duplicate)

OneToOne Fields display problem in admin gui

Reported by: nekron Owned by: nobody
Component: contrib.admin Version: master
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


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):

class Woman(models.Model):
    name = models.CharField(max_length=10)
    man = models.OneToOneField(Man)
    def __unicode__(self):

e.g., a woman is married to one man.

If I register both models with 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.

Change History (3)

comment:1 Changed 11 years ago by Karen Tracey

Resolution: duplicate
Status: newclosed

This is covered by #8562, I believe. There's a patch on that ticket you could try to verify.

comment:2 Changed 11 years ago by nekron

Yep, patch 8562_onetoone_attname.diff worked for me! Thanks!!

comment:3 Changed 8 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top