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) %}
<dt>{{ field.label }}
<dd>{{ field(**kwargs)|safe }}
{% if field.errors %}
<ul class="errors">
{% for error in field.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
</dd>
{% if field.errors %}
<ul class="errors">
{% for error in field.errors %}<li>{{ error }}{% endfor %}
</ul>
{% endif %}
</dd>
{% endmacro %}
This macro accepts a couple of keyword arguments that are forwarded to

Loading…
Cancel
Save