On 2012/07/25 12:41 PM, Daniel Roseman wrote:

You could probably subclass the CheckboxSelectMultiple widget and
override the `render` method to get what you want.

See the original code here:
https://github.com/django/django/blob/master/django/forms/widgets.py#L749
unfortunately you'll need to copy-and-paste most of that code but that
should give you the output you need while still leaving Django to do the
"messy data handling" .

Thanks Daniel. I am looking at that code distributed with 1.4, amazing how different it is in the head version already.

I think I'll try and do something similar to Select() which caters for <optgroup label="%s">, and if I can make that work then I'll override the render method to suit my layout purposes (try, being the operative word).

If I can make it work nicely it might be nice to upgrade it to the same style as the head version and offer it back as a snippet - that looks a long way off though!

--
Regards
Alex

--
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.

Reply via email to