According to the documentation I can iterate radio buttons {% for radio in myform.beatles %} <div class="myradio"> {{ radio }} </div> {% endfor %}
I want to do the same for checkboxes, but get TemplateSyntaxError Exception Value: Caught TypeError while rendering: 'BoundField' object is not iterable My field is class CategoryForm( forms.Form ): standard = forms.MultipleChoiceField( required = False, choices=[], widget = forms.CheckboxSelectMultiple( attrs= {'class':"chkboxdiv"} ) ) and I initialize it with def __init__(self, *args, **kwargs): super( CategoryForm, self).__init__(*args, **kwargs) self.fields['standard'].choices = [(i.interest,i.interest) for i in Interest.objects.filter( status = 'standard')] Is it possible to iterate over this in the template so I can place every choice in a <div></div> -- 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.