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 <mmclar@gmail.com>
This commit is contained in:
seanhelvey
2024-12-13 11:56:53 -08:00
committed by Jacob Walls
parent 3851601b2e
commit b1ffa9a9d7
15 changed files with 487 additions and 25 deletions

View File

@@ -953,6 +953,7 @@ answer newbie questions, and generally made Django that much better:
Scott Pashley <github@scottpashley.co.uk>
scott@staplefish.com
Sean Brant
Sean Helvey <me@seanhelvey.com>
Sebastian Hillig <sebastian.hillig@gmail.com>
Sebastian Spiegel <https://www.tivix.com/>
Segyo Myung <myungsekyo@gmail.com>