Django

Code

Ticket #9949 (closed: duplicate)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: matt@matterkkila.com Assigned to: nobody
Milestone: Component: django.contrib.admin
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Picture 2.png (16.3 kB) - added by anonymous on 01/03/09 02:11:05.

Change History

01/03/09 02:11:05 changed by anonymous

  • attachment Picture 2.png added.

01/03/09 02:14:09 changed by matt@matterkkila.com

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

Using python 2.6.1

01/03/09 02:19:36 changed by anonymous

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

01/05/09 04:46:16 changed by ramiro

  • status changed from new to closed.
  • resolution set to duplicate.

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.


Add/Change #9949 (When using named groups for choices, filter list in admin shows object data.)




Change Properties
Action