I have a Category and SubCategory model. Each SubCategory belongs to a Category via a Foreign Key. (So each Category can have many SubCategories.)
I have several places throughout my app where I show the list of SubCategories as part of some ModelForm. It renders like so: <select multiple="multiple"> <option>subcategory 1</option> <option>subcategory 2</option> <option>subcategory 3</option> ... </select> Which is dandy, but I would like to customize this a bit by showing Categories as well in an <optgroup>, like so: <select multiple="multiple"> <optgroup label="Category 1"> <option>subcategory 1</option> <option>subcategory 2</option> <option>subcategory 3</option> </optgroup> ... </select> Any ideas on how I can make that happen? Thanks in advance for any help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---