{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
{% if category == 'success' %}
{{ _('Success') }}
{% elif category == 'error' %}
{{ _('Error') }}
{% endif %}
{{ message }}
{% endfor %}
{% endif %}
{% endwith %}
{# What other features add below the form: linked accounts, notification
preferences and the like. Each section is a block of its own, with its
own forms if it needs them, which is why it sits outside the profile
form. Drawn only when a callback returns something. #}
{% set sections = render_template_hooks("profile.edit.sections") %}
{% if sections %}