What did you try?

I found it easily.

First:
print dir(myform) 
#I found that myform has a 'fields' attribute.

Second:
print dir(myform.fields['choicefieldname'])

#found myform.fields['choicefieldname'].choices

Third:
print myform.fields['choicefieldname'].choices
#got all the nice options I was looking for!


Then, in my template:

                {% for choice_value, choice_text in 
myform.fields.choicefieldname.choices %}
                choice_value: {{ choice_value }}<br/>
                choice_text: {{ choice_text }}<br/>
                {% endfor %}





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