Changes between Version 1 and Version 4 of Ticket #27331


Ignore:
Timestamp:
Oct 10, 2016, 11:00:06 AM (8 years ago)
Author:
Héctor Urbina
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27331

    • Property Has patch unset
  • Ticket #27331 – Description

    v1 v4  
    33I'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.
    44
    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.
     5What 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.
    66
    77Let me show with an example:
Back to Top