From 199854f1e90335ea37987a58efcde2ee6a3dd38a Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Tue, 16 Feb 2021 13:18:38 +0000 Subject: Start using Flask flash messages These are used to store a message string that can be later accessed. We can use Flask flash messages to alert about any error or providing info when processing a request. --- ogcp/templates/base.html | 15 +++++++++++++++ ogcp/views.py | 19 ++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) (limited to 'ogcp') diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html index 94f4579..4304e42 100644 --- a/ogcp/templates/base.html +++ b/ogcp/templates/base.html @@ -12,6 +12,21 @@ {% include 'nav.html' %} {% block nav %}{% endblock %} + {% block flash %} + {% for category, message in get_flashed_messages(with_categories=True) %} + {% if category == 'info' %} +