Skip to content

Commit

Permalink
wtforms: Add missing closing tags in example (#1917)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfontaine authored and davidism committed Jun 19, 2016
1 parent 9f2b3d8 commit 146cba5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/patterns/wtforms.rst
Expand Up @@ -82,7 +82,7 @@ Here's an example :file:`_formhelpers.html` template with such a macro:
.. sourcecode:: html+jinja

{% macro render_field(field) %}
<dt>{{ field.label }}
<dt>{{ field.label }}</dt>
<dd>{{ field(**kwargs)|safe }}
{% if field.errors %}
<ul class=errors>
Expand All @@ -108,15 +108,15 @@ takes advantage of the :file:`_formhelpers.html` template:
.. sourcecode:: html+jinja

{% from "_formhelpers.html" import render_field %}
<form method=post action="/register">
<form method=post>
<dl>
{{ render_field(form.username) }}
{{ render_field(form.email) }}
{{ render_field(form.password) }}
{{ render_field(form.confirm) }}
{{ render_field(form.accept_tos) }}
</dl>
<p><input type=submit value=Register>
<p><input type=submit value=Register></p>
</form>

For more information about WTForms, head over to the `WTForms
Expand Down

0 comments on commit 146cba5

Please sign in to comment.