From 1f38d4a24684d6c86802cd15ad6f7b69910bb9bb Mon Sep 17 00:00:00 2001 From: Ruidy Nemausat Date: Tue, 3 Dec 2019 20:57:08 +0100 Subject: [PATCH] staticfiles --- storage.py | 4 ++-- villafleurie/settings.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/storage.py b/storage.py index f994ced..22fb970 100644 --- a/storage.py +++ b/storage.py @@ -1,5 +1,5 @@ -from whitenoise.storage import CompressedManifestStaticFilesStorage +from whitenoise import CompressedManifestStaticFiles -class WhiteNoiseStaticFilesStorage(CompressedManifestStaticFilesStorage): +class WhiteNoiseStaticFiles(CompressedManifestStaticFiles): manifest_strict = False diff --git a/villafleurie/settings.py b/villafleurie/settings.py index 4247176..1e1499b 100644 --- a/villafleurie/settings.py +++ b/villafleurie/settings.py @@ -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'