From fc9edfb1b65260f41f204d11bf130ceb35cb84e0 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 26 Feb 2021 11:30:18 -0800 Subject: web: reduce flash() usage; have logins redirect --- python/fatcat_web/templates/base.html | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'python/fatcat_web/templates/base.html') diff --git a/python/fatcat_web/templates/base.html b/python/fatcat_web/templates/base.html index 8cdc3fbf..73f33d0d 100644 --- a/python/fatcat_web/templates/base.html +++ b/python/fatcat_web/templates/base.html @@ -101,14 +101,17 @@
{% with messages = get_flashed_messages() %} {% if messages %} -
+
{# Needs more javascript: #} -
Flash Message!
-
    - {% for message in messages %} -
  • {{ message|safe }} - {% endfor %} -
+ {% if messages|length == 1 %} +
{{ messages[0]|safe }}
+ {% else %} +
    + {% for message in messages %} +
  • {{ message|safe }} + {% endfor %} +
+ {% endif %}
{% endif %} {% endwith %} -- cgit v1.2.3