{% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
        <table style="width:100%">
            {% for category, message in messages %}
                <tr><td>
                <div class="alert alert-{{ category }} alert-dismissible" role="alert">
                    <button data-dismiss="alert" type="button" class="close" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    {{ message }}
                </div>
                </td></tr>
            {% endfor %}
        </table>
    {% endif %}
{% endwith %}