Fix django 4.2 deprecations

This commit is contained in:
Gabriel Augendre 2023-04-04 18:22:38 +02:00 committed by github-actions[bot]
parent 42b9212b32
commit 14aa11cbf8
2 changed files with 12 additions and 2 deletions

View file

@ -168,7 +168,12 @@ APP_DATA = env("APP_DATA")
STATIC_URL = "/static/" STATIC_URL = "/static/"
STATIC_ROOT = env("STATIC_ROOT") STATIC_ROOT = env("STATIC_ROOT")
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" STORAGES = {
"default": {"BACKEND": "django.core.files.storage.FileSystemStorage"},
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}
# Medias # Medias
MEDIA_URL = "/media/" MEDIA_URL = "/media/"

View file

@ -10,7 +10,12 @@ def _collectstatic():
@pytest.fixture() @pytest.fixture()
def live_server(settings, live_server): def live_server(settings, live_server):
settings.STATICFILES_STORAGE = "whitenoise.storage.CompressedStaticFilesStorage" settings.STORAGES = {
"default": {"BACKEND": "django.core.files.storage.FileSystemStorage"},
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedStaticFilesStorage",
},
}
return live_server return live_server