Django forms are really easy and nice to style especially if you like to take control of the outcom开发者_C百科e.
A question. Is there anyway you can see whether the {{ field }}
type, ie checkbox, radio etc?
you could create a field_type template filter
{{ field|field_type }} = CharField
{{ field|widget_type }} = TextInput
heres a great example :
http://olivergeorge.posterous.com/django-template-tags-to-find-out-field-type
精彩评论