Opened 16 years ago

Closed 16 years ago

#9949 closed (duplicate)

When using named groups for choices, filter list in admin shows object data.

Reported by: matt@… Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I tested this against both 1.0.2 and SVN-9694
Code:

MEDIA_CHOICES = (
    ('Audio', (
            (1, 'Vinyl'),
            (2, 'CD'),
        )
    ),
    ('Video', (
            (3, 'VHS Tape'),
            (4, 'DVD'),
        )
    ),
)

class Media(models.Model):
    user  = models.ForeignKey(User)
    media = models.IntegerField(choices=CHOICES_MEDIA)

See attached file for what is displayed.

Attachments (1)

Picture 2.png (16.3 KB ) - added by anonymous 16 years ago.

Download all attachments as: .zip

Change History (4)

by anonymous, 16 years ago

Attachment: Picture 2.png added

comment:1 by matt@…, 16 years ago

Using python 2.6.1

comment:2 by anonymous, 16 years ago

Values in MEDIA_CHOICES are wrapped in ugettext_lazy('Vinyl')

comment:3 by Ramiro Morales, 16 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #9954 that includes a patch. I've tested the case you posted (wrapping one or more lables with ugettext_lazy()) and it's fixed when that patch is applied.

Sorry I didn't associate both reports but the report wasn't very clear.

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