1 2 3 4 5 6 7 8 9 10 11 12
{% macro render_field(field) %} <dt>{{ field.label }} <dd>{{ field(class="form-control",**kwargs)|safe }} {% if field.errors %} <ul class=errors> {% for error in field.errors %} <li>{{ error }}</li> {% endfor %} </ul> {% endif %} </dd> {% endmacro %}