Changes between Version 1 and Version 4 of Ticket #27331
- Timestamp:
- Oct 10, 2016, 11:00:06 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27331
- Property Has patch unset
-
Ticket #27331 – Description
v1 v4 3 3 I've just implemented this and I thought It could well be incorporated into Django itself; I guess it's a fairly common feature that one may need on any project. 4 4 5 What I propose is to add a `opt_group` argument to ModelChoiceField and ModelMultipleChoiceField; which indicates the item's field whose value is used to group the choices. It should be used in conjunction with a queryset which is (primarily) sorted by the same field.5 What I propose is to add an optional `opt_group` argument to ModelChoiceField and ModelMultipleChoiceField; which indicates the item's field whose value is used to group the choices. It should be used in conjunction with a queryset which is (primarily) sorted by the same field. 6 6 7 7 Let me show with an example: