{{{
MEDIA_CHOICES = (
('Audio', (
('vinyl', 'Vinyl'),
('cd', 'CD'),
)
),
('Video', (
('vhs', 'VHS Tape'),
('dvd', 'DVD'),
)
),
('unknown', 'Unknown'),
)
}}}
the "unknown" option is displayed at the beginning of the dropbox.
More generally, every non-grouped options are displayed first, followed by
grouped options.
If an embedded mix of them is needed -- which is my case -- the order is
entirely lost.
I guess this is not the expected behavior.
Thanks for your assistance,
--
Ticket URL: <https://code.djangoproject.com/ticket/28157>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* easy: 1 => 0
Comment:
I can't reproduce the behavior you describe using this model in the admin:
{{{
class Record(models.Model):
media = models.CharField(max_length=25, choices=MEDIA_CHOICES)
}}}
Can you add more details about how to reproduce the issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/28157#comment:1>
* severity: Normal => Release blocker
* easy: 1 => 0
* stage: Unreviewed => Accepted
Comment:
Regression bisected to b52c73008a9d67e9ddbb841872dc15cdd3d6ee01 (template-
based widget rendering).
--
Ticket URL: <https://code.djangoproject.com/ticket/28157#comment:1>
* status: new => assigned
* owner: nobody => Tim Graham
--
Ticket URL: <https://code.djangoproject.com/ticket/28157#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/8450 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28157#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28157#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d302e2c09c281e6b1e187f704f656e5e79e69246" d302e2c0]:
{{{
#!CommitTicketReference repository=""
revision="d302e2c09c281e6b1e187f704f656e5e79e69246"
Fixed #28157 -- Fixed choice ordering in form fields with grouped and non-
grouped options.
Regression in b52c73008a9d67e9ddbb841872dc15cdd3d6ee01.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28157#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"0615601498e6f7354e05498fc589c556f5365280" 06156014]:
{{{
#!CommitTicketReference repository=""
revision="0615601498e6f7354e05498fc589c556f5365280"
[1.11.x] Fixed #28157 -- Fixed choice ordering in form fields with grouped
and non-grouped options.
Regression in b52c73008a9d67e9ddbb841872dc15cdd3d6ee01.
Backport of d302e2c09c281e6b1e187f704f656e5e79e69246 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28157#comment:6>