Django Forms framework is excellent and renders the entire form by just the following.
{{ form.as_p }}
For a registration form, it converts
If you just need all labels to have a particular class, the best way would be to change the markup and CSS slightly. Put a with your class around the form: {{ form.as_p }} and make the CSS definition as follows: div.field-title label { ... } 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
with your class around the form: {{ form.as_p }} and make the CSS definition as follows: div.field-title label { ... } 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
and make the CSS definition as follows:
div.field-title label { ... }