Browse Source

Fixed indentation of an example.

pull/1638/head
Armin Ronacher 15 years ago
parent
commit
56675b3bad
  1. 14
      docs/patterns/wtforms.rst

14
docs/patterns/wtforms.rst

@ -73,14 +73,12 @@ Here an example `_formhelpers.html` template with such a macro:
{% macro render_field(field) %} {% macro render_field(field) %}
<dt>{{ field.label }} <dt>{{ field.label }}
<dd>{{ field(**kwargs)|safe }} <dd>{{ field(**kwargs)|safe }}
{% if field.errors %} {% if field.errors %}
<ul class="errors"> <ul class="errors">
{% for error in field.errors %} {% for error in field.errors %}<li>{{ error }}{% endfor %}
<li>{{ error }}</li> </ul>
{% endfor %} {% endif %}
</ul> </dd>
{% endif %}
</dd>
{% endmacro %} {% endmacro %}
This macro accepts a couple of keyword arguments that are forwarded to This macro accepts a couple of keyword arguments that are forwarded to

Loading…
Cancel
Save