|
|
@ -73,14 +73,12 @@ Here an example `_formhelpers.html` template with such a macro: |
|
|
|
{% macro render_field(field) %} |
|
|
|
{% macro render_field(field) %} |
|
|
|
<dt>{{ field.label }} |
|
|
|
<dt>{{ field.label }} |
|
|
|
<dd>{{ field(**kwargs)|safe }} |
|
|
|
<dd>{{ field(**kwargs)|safe }} |
|
|
|
{% if field.errors %} |
|
|
|
{% if field.errors %} |
|
|
|
<ul class="errors"> |
|
|
|
<ul class="errors"> |
|
|
|
{% for error in field.errors %} |
|
|
|
{% for error in field.errors %}<li>{{ error }}{% endfor %} |
|
|
|
<li>{{ error }}</li> |
|
|
|
</ul> |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|
</ul> |
|
|
|
</dd> |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</dd> |
|
|
|
|
|
|
|
{% endmacro %} |
|
|
|
{% endmacro %} |
|
|
|
|
|
|
|
|
|
|
|
This macro accepts a couple of keyword arguments that are forwarded to |
|
|
|
This macro accepts a couple of keyword arguments that are forwarded to |
|
|
|