I am trying to iterate through form.fields in a template and for:
{% for field in form.fields %}
{{ field }},
{% endfor %}
I am getting a list of the field names ("name, description...") instead of the html code that is rendered when using the following:
{{ form.name }}, {{ form.description }}
(the output in this case is:
<input id="id_name" type="text" name="name" maxlength="200" /><input id="id_description"....
Any hints?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…