{% if messages %}
<div class="row mt-5">
    <div class="col-sm-12 col-md-12">
        {% for message in messages %}
        {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}
        <div class="alert alert-danger" role="alert">
            {{ message|safe }}
        </div>
        {% elif message.level == DEFAULT_MESSAGE_LEVELS.INFO %}
        <div class="alert alert-info" role="alert">
            {{ message|safe }}
        </div>
        {% else %}
        <div class="alert alert-success" role="alert">
            {{ message|safe }}
        </div>
        {% endif %}
        {% endfor %}
    </div>
</div>
{% endif %}