djangosnippets.org: Latest snippets tagged with 'Forms'http://djangosnippets.org/tags/forms_1/2015-04-08T19:21:29.875853-05:00Grouped Model Choice Field
2015-04-08T19:21:29.875853-05:00JulieGoldberghttp://djangosnippets.org/snippets/10478/<p>This class lets me have a model choice field that includes optgroups . Django has built-in support for optgroups if you explicitly set all the choices in a ChoiceField, but that doesn't help with ModelChoiceFields. Optgroups let you have nice-looking subscategories in huge dropdowns. They're even more useful if you're …</p>
Freely redistributable