From 8baafff6469104fcbc08843c7c48c11b1764aecf Mon Sep 17 00:00:00 2001 From: Julian Dehm Date: Tue, 29 Oct 2024 16:37:40 +0100 Subject: [PATCH 1/2] settings/production.py: replace deprecated staticfilesstorage --- changelog/966.md | 3 +++ digitalstrategie/settings/production.py | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 changelog/966.md diff --git a/changelog/966.md b/changelog/966.md new file mode 100644 index 00000000..b6b44196 --- /dev/null +++ b/changelog/966.md @@ -0,0 +1,3 @@ +### Fixed + +- replace deprecated staticfilesstorage with new STORAGES setting (#966) diff --git a/digitalstrategie/settings/production.py b/digitalstrategie/settings/production.py index cde1ee24..845677ee 100644 --- a/digitalstrategie/settings/production.py +++ b/digitalstrategie/settings/production.py @@ -1,8 +1,17 @@ from .base import * -STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' DEBUG = False +STORARGES = { + "default": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, + "staticfiles": { + "BACKEND": 'whitenoise.storage.CompressedManifestStaticFilesStorage' + }, +} + + try: from .local import * except ImportError: From 5d8e1e6e90641edd73329f87ed5c169eacfa2875 Mon Sep 17 00:00:00 2001 From: Julian Dehm Date: Tue, 29 Oct 2024 16:39:05 +0100 Subject: [PATCH 2/2] settings/base: replace IGNORE setting for webpack loader with a valid regexp --- changelog/_0001.md | 3 +++ digitalstrategie/settings/base.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog/_0001.md diff --git a/changelog/_0001.md b/changelog/_0001.md new file mode 100644 index 00000000..12c7f0f5 --- /dev/null +++ b/changelog/_0001.md @@ -0,0 +1,3 @@ +### Fixed + +- fix IGNORE setting of webpack loader config not being a valid regexp diff --git a/digitalstrategie/settings/base.py b/digitalstrategie/settings/base.py index b343529c..d97094af 100644 --- a/digitalstrategie/settings/base.py +++ b/digitalstrategie/settings/base.py @@ -158,7 +158,7 @@ 'BUNDLE_DIR_NAME': '/static/', # must end with slash 'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'), 'POLL_INTERVAL': 0.1, - 'IGNORE': ['.+\.hot-update.js', '.+\.map'] + 'IGNORE': [r'.+\.hot-update.js', r'.+\.map'], } }