update settings for message handling and static files handling
This commit is contained in:
parent
f1a9e64c75
commit
aaae8a23da
1 changed files with 17 additions and 2 deletions
|
@ -38,11 +38,12 @@ INSTALLED_APPS = [
|
||||||
"django.contrib.messages",
|
"django.contrib.messages",
|
||||||
"django.contrib.staticfiles",
|
"django.contrib.staticfiles",
|
||||||
"rest_framework",
|
"rest_framework",
|
||||||
"django_extensions",
|
# "django_extensions",
|
||||||
"budget",
|
"budget",
|
||||||
"agent",
|
"agent",
|
||||||
"wishlist",
|
# "wishlist",
|
||||||
"frontend",
|
"frontend",
|
||||||
|
"shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
@ -135,7 +136,21 @@ USE_TZ = True
|
||||||
|
|
||||||
STATIC_URL = "/static/"
|
STATIC_URL = "/static/"
|
||||||
|
|
||||||
|
STATIC_ROOT = "static/"
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
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",
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue