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

🚜 Use STORAGES["staticfiles"] instead of STATICFILES_STORAGE #26

Merged
merged 1 commit into from
May 26, 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
6 changes: 5 additions & 1 deletion config/settings.py-tpl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ USE_TZ = True
STATIC_ROOT = str(BASE_DIR.joinpath("static"))
STATIC_URL = "/static/"
STATICFILES_DIRS = (str(BASE_DIR.joinpath("frontend")),)
# STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
# STORAGES = {
# "staticfiles": {
# "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage"
# }
# }

MEDIA_URL = "/media/"
MEDIA_ROOT = str(BASE_DIR.joinpath("media"))
Expand Down
9 changes: 6 additions & 3 deletions conftest.py-tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ def use_test_settings(settings):
# User a faster password hasher
settings.PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]

settings.STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.StaticFilesStorage"
)
settings.STORAGES = {
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"
}
}


settings.WHITENOISE_AUTOREFRESH = True