Update default project settings to use STORAGES instead of STATICFILES_STORAGE

We've bumped the template's requirements to use Django >= 4.2, so STATICFILES_STORAGE is deprecated
pull/11204/head
Sage Abdullah 2023-11-07 10:51:42 +00:00 zatwierdzone przez Matt Westcott
rodzic e16614bce8
commit a631d6bb72
1 zmienionych plików z 15 dodań i 5 usunięć

Wyświetl plik

@ -137,17 +137,27 @@ STATICFILES_DIRS = [
os.path.join(PROJECT_DIR, "static"),
]
# ManifestStaticFilesStorage is recommended in production, to prevent outdated
# JavaScript / CSS assets being served from cache (e.g. after a Wagtail upgrade).
# See https://docs.djangoproject.com/en/{{ docs_version }}/ref/contrib/staticfiles/#manifeststaticfilesstorage
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = "/static/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = "/media/"
# Default storage settings, with the staticfiles storage updated.
# See https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#std-setting-STORAGES
STORAGES = {
"default": {
"BACKEND": "django.core.files.storage.FileSystemStorage",
},
# ManifestStaticFilesStorage is recommended in production, to prevent
# outdated JavaScript / CSS assets being served from cache
# (e.g. after a Wagtail upgrade).
# See https://docs.djangoproject.com/en/{{ docs_version }}/ref/contrib/staticfiles/#manifeststaticfilesstorage
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.ManifestStaticFilesStorage",
},
}
# Wagtail settings