From abb5090d63ec817bbe03195417175156e565c306 Mon Sep 17 00:00:00 2001 From: Adarnof Date: Wed, 3 Nov 2021 21:02:03 -0400 Subject: [PATCH] Use danger and error message tags to render correctly on admin site. Closes #1305 (cherry picked from commit f17ebbede6d675f6308f41b3e72b78758642ef60) --- allianceauth/project_template/project_name/settings/base.py | 2 +- allianceauth/templates/allianceauth/messages.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/allianceauth/project_template/project_name/settings/base.py b/allianceauth/project_template/project_name/settings/base.py index 18ec3634..af53215f 100644 --- a/allianceauth/project_template/project_name/settings/base.py +++ b/allianceauth/project_template/project_name/settings/base.py @@ -167,7 +167,7 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static') # Bootstrap messaging css workaround MESSAGE_TAGS = { - messages.ERROR: 'danger' + messages.ERROR: 'danger error' } CACHES = { diff --git a/allianceauth/templates/allianceauth/messages.html b/allianceauth/templates/allianceauth/messages.html index e1c61455..41fc2756 100644 --- a/allianceauth/templates/allianceauth/messages.html +++ b/allianceauth/templates/allianceauth/messages.html @@ -13,7 +13,7 @@ {% elif message.level_tag == "warning" %} - {% elif message.level_tag == "danger" %} + {% elif "danger" in message.level_tag %} {% endif %}