staticfiles

This commit is contained in:
Ruidy Nemausat 2019-12-03 20:57:08 +01:00
parent ad8812ea36
commit 1f38d4a246
2 changed files with 6 additions and 5 deletions

View file

@ -1,5 +1,5 @@
from whitenoise.storage import CompressedManifestStaticFilesStorage
from whitenoise import CompressedManifestStaticFiles
class WhiteNoiseStaticFilesStorage(CompressedManifestStaticFilesStorage):
class WhiteNoiseStaticFiles(CompressedManifestStaticFiles):
manifest_strict = False

View file

@ -37,9 +37,10 @@ MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware'
]
# if os.environ.get('ENV') == 'PRODUCTION':
# STATICFILES_STORAGE = 'storage.WhiteNoiseStaticFilesStorage'
# STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
if os.environ.get('ENV') == 'PRODUCTION':
# STATICFILES_STORAGE = 'storage.WhiteNoiseStaticFilesStorage'
# STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'
# STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'