forked from orbit-oss/flask
wtforms: Add missing closing tags in example (#1917)
This commit is contained in:
parent
9f2b3d815e
commit
146cba53e7
1 changed files with 3 additions and 3 deletions
|
|
@ -82,7 +82,7 @@ Here's an example :file:`_formhelpers.html` template with such a macro:
|
||||||
.. sourcecode:: html+jinja
|
.. sourcecode:: html+jinja
|
||||||
|
|
||||||
{% macro render_field(field) %}
|
{% macro render_field(field) %}
|
||||||
<dt>{{ field.label }}
|
<dt>{{ field.label }}</dt>
|
||||||
<dd>{{ field(**kwargs)|safe }}
|
<dd>{{ field(**kwargs)|safe }}
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
<ul class=errors>
|
<ul class=errors>
|
||||||
|
|
@ -108,7 +108,7 @@ takes advantage of the :file:`_formhelpers.html` template:
|
||||||
.. sourcecode:: html+jinja
|
.. sourcecode:: html+jinja
|
||||||
|
|
||||||
{% from "_formhelpers.html" import render_field %}
|
{% from "_formhelpers.html" import render_field %}
|
||||||
<form method=post action="/register">
|
<form method=post>
|
||||||
<dl>
|
<dl>
|
||||||
{{ render_field(form.username) }}
|
{{ render_field(form.username) }}
|
||||||
{{ render_field(form.email) }}
|
{{ render_field(form.email) }}
|
||||||
|
|
@ -116,7 +116,7 @@ takes advantage of the :file:`_formhelpers.html` template:
|
||||||
{{ render_field(form.confirm) }}
|
{{ render_field(form.confirm) }}
|
||||||
{{ render_field(form.accept_tos) }}
|
{{ render_field(form.accept_tos) }}
|
||||||
</dl>
|
</dl>
|
||||||
<p><input type=submit value=Register>
|
<p><input type=submit value=Register></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
For more information about WTForms, head over to the `WTForms
|
For more information about WTForms, head over to the `WTForms
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue