Reputation: 6058
I've a form
class DialogForm(forms.ModelForm):
LISTING_CHOICES = ((1, _('Public')), (0, _('Unlisted')))
first_question = forms.TextInput(attrs={'class': 'span4'})
listing = forms.ChoiceField(widget=forms.RadioSelect, choices=LISTING_CHOICES)
I'm trying to get listing fields separately from template
{% for radio in dialog_form.listing %}
{{ radio }}
{% endfor %}
But I got exception Exception Value: 'BoundField' object is not iterable
Django Version: 1.3.1
How to work with RadioSelect
widget to access its rendered sub-elements?
Sultan,
Thanks.
Upvotes: 0
Views: 334
Reputation: 148
I believe this is not possible in Django 1.3.1 Pretty sure you need version 1.4 to do this.
Upvotes: 1