{% macro render_field(field) %}
{{ field.name[0:1]|upper }} {{ field.label }} {{ field(**kwargs)|safe }}
{% if field.errors %} {% for error in field.errors %} {{ error }} {% endfor %} {% endif %} {% endmacro %} {% macro render_field_with_value(field, corpus_file) %} {% set field_name = field.name %} {{ field_name }}
{{ field.name[0:1]|upper }} {{ field.label }} {{ field(value=corpus_file[field.name])| safe }}
{% if field.errors %} {% for error in field.errors %} {{ error }} {% endfor %} {% endif %} {% endmacro %}