{% if messages %}
    {% for message in messages %}
        {% if message.tags == 'success' %}
        <div class="alert alert-success alert-dismissible fade show" role="alert">
            <i class="bi bi-hand-thumbs-up"></i> {{ message|safe}}
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
        {% endif %}
        {% if message.tags == 'error' %}
        <div class="alert alert-danger alert-dismissible fade show" role="alert">
            <i class="bi bi-hand-thumbs-down"></i> {{ message|safe}}
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
        {% endif %}
        {% if message.tags == 'warning' %}
        <div class="alert alert-warning alert-dismissible fade show" role="alert">
            <i class="bi bi-exclamation-triangle"></i> {{ message|safe}}
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
        {% endif %}
    {% endfor %}
{% endif %}