Skip to content
Myr

Update docs/patterns/wtforms.rst

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by awsum · committed by Ron DuPlain · parent fc7fe62 · Browse files · 1 file+5 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−3 removed

  • other:+5 added−3 removed

1 file+5 added−3 removed

modified:docs/patterns/wtforms.rst+5 added-3 removed
83 unmodified lines
84 {% macro render_field(field) %}85 <dt>{{ field.label }}86 <dd>{{ field(**kwargs)|safe }}87 {% if field.errors %}88 <ul class="errors">89 {% for error in field.errors %}<li>{{ error }}{% endfor %}88 <ul class=errors>89 {% for error in field.errors %}90 <li>{{ error }}</li>91 {% endfor %}92 </ul>93 {% endif %}94 </dd>95 {% endmacro %}
11 unmodified lines
107108.. sourcecode:: html+jinja109110 {% from "_formhelpers.html" import render_field %}109 <form method="post" action="/register">111 <form method=post action="/register">112 <dl>113 {{ render_field(form.username) }}114 {{ render_field(form.email) }}115 {{ render_field(form.password) }}
11 unmodified lines