1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{% macro render_field(field) %} <div class="row g-2"> <div class="col-sm-3"> {{ field.label }} </div> <div class="col-sm"> {{ field(**kwargs)|safe }} </div> </div> {% if field.errors %} <ul class="errors"> {% for error in field.errors %} <li>{{ error }}</li> {% endfor %} </ul> {% endif %} {% endmacro %}