fix: add danger tag to error messages

This commit is contained in:
Ethan Nguyen 2021-04-22 17:58:22 -04:00
parent aa8c7f95b2
commit ec8834ef83
No known key found for this signature in database
GPG Key ID: B4CA5339AF911920

View File

@ -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: