Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#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.

Change History (3)

comment:1 by Karen Tracey, 16 years ago

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 by nekron, 16 years ago

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

comment:3 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

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