From ec8834ef836cc6e6c1150e739df97e966a99d4ba Mon Sep 17 00:00:00 2001 From: Ethan Nguyen Date: Thu, 22 Apr 2021 17:58:22 -0400 Subject: [PATCH] fix: add danger tag to error messages --- tjdests/settings/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tjdests/settings/__init__.py b/tjdests/settings/__init__.py index 7d99eaf..554ed3e 100644 --- a/tjdests/settings/__init__.py +++ b/tjdests/settings/__init__.py @@ -12,9 +12,11 @@ https://docs.djangoproject.com/en/3.2/ref/settings/ import logging import os from pathlib import Path -# Build paths inside the project like this: BASE_DIR / 'subdir'. from typing import List +from django.contrib.messages import constants as messages + +# Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -157,6 +159,10 @@ LOGIN_URL = "authentication:login" CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5" CRISPY_TEMPLATE_PACK = "bootstrap5" +MESSAGE_TAGS = { + messages.ERROR: "danger", +} + try: from .secret import * # noqa # pylint: disable=unused-import except ImportError: