use flask flash for notifications
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
{% from "components/text_input.html" import TextInput %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
|
||||
{% set title_text = 'Edit {} project'.format(project.name) if project else 'Add a new project' %}
|
||||
|
||||
|
||||
9
templates/fragments/flash.html
Normal file
9
templates/fragments/flash.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% from "components/alert.html" import Alert %}
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message_config in messages %}
|
||||
{{ Alert(message_config["title"], message=message_config.get("message"), level=category) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
Reference in New Issue
Block a user