Skip to content

Commit

Permalink
Update docs/patterns/wtforms.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
awsum authored and rduplain committed Feb 25, 2012
1 parent fc7fe62 commit 20a3281
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/patterns/wtforms.rst
Expand Up @@ -85,8 +85,10 @@ Here's an example `_formhelpers.html` template with such a macro:
<dt>{{ field.label }}
<dd>{{ field(**kwargs)|safe }}
{% if field.errors %}
<ul class="errors">
{% for error in field.errors %}<li>{{ error }}{% endfor %}
<ul class=errors>
{% for error in field.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
</dd>
Expand All @@ -106,7 +108,7 @@ takes advantage of the `_formhelpers.html` template:
.. sourcecode:: html+jinja

{% from "_formhelpers.html" import render_field %}
<form method="post" action="/register">
<form method=post action="/register">
<dl>
{{ render_field(form.username) }}
{{ render_field(form.email) }}
Expand Down

0 comments on commit 20a3281

Please sign in to comment.