Re: [Django] #13883: Render named groups of field choices in the admin with optgroups

1 view
Skip to first unread message

Django

unread,
Jan 21, 2026, 10:24:43 PM (3 days ago) Jan 21
to django-...@googlegroups.com
#13883: Render named groups of field choices in the admin with optgroups
-------------------------------------+-------------------------------------
Reporter: SardarNL | Owner: Sean
| Helvey
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: admin, SelectBox, | Triage Stage: Ready for
optgroup, sprintdec2010 | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/13883#comment:53>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 22, 2026, 9:12:34 PM (2 days ago) Jan 22
to django-...@googlegroups.com
#13883: Render named groups of field choices in the admin with optgroups
-------------------------------------+-------------------------------------
Reporter: SardarNL | Owner: Sean
| Helvey
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: fixed
Keywords: admin, SelectBox, | Triage Stage: Ready for
optgroup, sprintdec2010 | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"b1ffa9a9d78b0c2c5ad6ed5a1d84e380d5cfd010" b1ffa9a]:
{{{#!CommitTicketReference repository=""
revision="b1ffa9a9d78b0c2c5ad6ed5a1d84e380d5cfd010"
Fixed #13883 -- Rendered named choice groups with <optgroup> in
FilteredSelectMultiple.

This patch adds support for <optgroup>s in FilteredSelectMultiple widgets.
When a popup returns a new object, if the source field contains optgroup
choices, the optgroup is now also included in the response data.

Additionally, this adds error handling for invalid source_model parameters
to prevent crashes and display user-friendly error messages instead.

Co-authored-by: Michael McLarnon <mmc...@gmail.com>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/13883#comment:54>
Reply all
Reply to author
Forward
0 new messages