Fix flask.messages render
This commit is contained in:
parent
88751b46bd
commit
b465513212
|
@ -195,7 +195,11 @@
|
|||
{% block messages %}
|
||||
{% for level, message in get_flashed_messages(with_categories=true) %}
|
||||
<div class="alert alert-{{ level}} alert-dismissible fade show" role="alert">
|
||||
{% if '_message_icon' in session %}
|
||||
<i class="bi bi-{{ session['_message_icon'][level]}} me-1"></i>
|
||||
{% else %}<!-- fallback if 3rd party libraries (e.g. flask_login.login_required) -->
|
||||
<i class="bi bi-info-circle me-1"></i>
|
||||
{% endif %}
|
||||
{{ message }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
|
|
Reference in New Issue