{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
{{ message }}
{% endfor %} {% endif %} {% endwith %}
{{render_form(form, novalidate=True, button_map={"submit": "primary"}) }}