update settings for message handling and static files handling

This commit is contained in:
sinavir 2023-02-13 02:23:08 +01:00
parent f1a9e64c75
commit aaae8a23da

View file

@ -38,11 +38,12 @@ INSTALLED_APPS = [
"django.contrib.messages",
"django.contrib.staticfiles",
"rest_framework",
"django_extensions",
# "django_extensions",
"budget",
"agent",
"wishlist",
# "wishlist",
"frontend",
"shared",
]
MIDDLEWARE = [
@ -135,7 +136,21 @@ USE_TZ = True
STATIC_URL = "/static/"
STATIC_ROOT = "static/"
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
# Messages tags
from django.contrib import messages
MESSAGE_TAGS = {
messages.DEBUG: "is-warning",
messages.INFO: "is-info",
messages.SUCCESS: "is-success",
messages.WARNING: "is-warning",
messages.ERROR: "is-danger",
}