diff --git a/passbook/core/requirements.txt b/passbook/core/requirements.txt index fd80ba3f1..5d7793425 100644 --- a/passbook/core/requirements.txt +++ b/passbook/core/requirements.txt @@ -12,3 +12,4 @@ psycopg2 PyYAML sentry-sdk pip +whitenoise diff --git a/passbook/core/settings.py b/passbook/core/settings.py index 421d9c122..47dda43c3 100644 --- a/passbook/core/settings.py +++ b/passbook/core/settings.py @@ -121,6 +121,7 @@ CACHES = { MIDDLEWARE = [ 'django.contrib.sessions.middleware.SessionMiddleware', + 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'passbook.app_gw.middleware.ApplicationGatewayMiddleware', 'django.middleware.security.SecurityMiddleware', @@ -246,6 +247,7 @@ with CONFIG.cd('web'): # https://docs.djangoproject.com/en/2.1/howto/static-files/ STATIC_URL = '/static/' +STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' LOG_HANDLERS = ['console', 'syslog', 'file']