mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-11-22 08:08:04 +01:00
fix django STATICFILES_STORAGE deprecation warning
This commit is contained in:
parent
6c4a1b40b1
commit
741d2adbf8
2 changed files with 17 additions and 2 deletions
|
@ -196,11 +196,19 @@ USE_TZ = True
|
|||
|
||||
STATIC_URL = "static/"
|
||||
STATIC_ROOT = env("STATIC_ROOT")
|
||||
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
||||
|
||||
MEDIA_URL = "media/"
|
||||
MEDIA_ROOT = BASE_DIR.parent / "media"
|
||||
|
||||
STORAGES = {
|
||||
"default": {
|
||||
"BACKEND": "django.core.files.storage.FileSystemStorage",
|
||||
},
|
||||
"staticfiles": {
|
||||
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
|
||||
},
|
||||
}
|
||||
|
||||
AUTH_USER_MODEL = "common.User"
|
||||
|
||||
LOGIN_URL = "admin:login"
|
||||
|
|
|
@ -9,7 +9,14 @@ def _collectstatic():
|
|||
|
||||
@pytest.fixture()
|
||||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue