Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deprecation of staticfilesstorage setting and webpack_loader config #1011

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/966.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- replace deprecated staticfilesstorage with new STORAGES setting (#966)
3 changes: 3 additions & 0 deletions changelog/_0001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- fix IGNORE setting of webpack loader config not being a valid regexp
2 changes: 1 addition & 1 deletion digitalstrategie/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
}
}

Expand Down
11 changes: 10 additions & 1 deletion digitalstrategie/settings/production.py
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Loading