Non-trivial.  I would up writing a template filter to do this.  You
have to use undocumented,
I believe, interfaces.  I called my filter checkboxiterator, so usage
looks something like:

  {% for pseudocheckbox in some_multi_select_field|checkboxiterator %}

It iterates over a set of instances of a non-model class having
attributes you need to render
the checkbox (name, a suitably escaped option_label, option_value,
final_attrs, and a boolean
as to whether optionvlaue is in the bound field's values - that is, is
selected).

It uses another private class that has an __init__ and a render, an
instance of which is
passed to bound_field.as_widget() to capture teh name, data (values)
and attrs.  If there's
an 'id' attr, you also have to dumy up an enhanced version for each checkbox.

About 80 lines of code, if I can count the blank lines for prettyness.

Bill

On Wed, Aug 11, 2010 at 5:21 PM, Andreas Pfrengle <a.pfren...@gmail.com> wrote:
> Just to push it up again... any ideas?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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