switch to whitenoise for static files

This commit is contained in:
Jens Langhammer 2019-04-11 13:43:08 +02:00
parent a9031a6abc
commit 366ef352c6
2 changed files with 3 additions and 0 deletions

View file

@ -12,3 +12,4 @@ psycopg2
PyYAML
sentry-sdk
pip
whitenoise

View file

@ -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']