switch to whitenoise for static files
This commit is contained in:
parent
a9031a6abc
commit
366ef352c6
|
@ -12,3 +12,4 @@ psycopg2
|
||||||
PyYAML
|
PyYAML
|
||||||
sentry-sdk
|
sentry-sdk
|
||||||
pip
|
pip
|
||||||
|
whitenoise
|
||||||
|
|
|
@ -121,6 +121,7 @@ CACHES = {
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'passbook.app_gw.middleware.ApplicationGatewayMiddleware',
|
'passbook.app_gw.middleware.ApplicationGatewayMiddleware',
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
|
@ -246,6 +247,7 @@ with CONFIG.cd('web'):
|
||||||
# https://docs.djangoproject.com/en/2.1/howto/static-files/
|
# https://docs.djangoproject.com/en/2.1/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||||
|
|
||||||
LOG_HANDLERS = ['console', 'syslog', 'file']
|
LOG_HANDLERS = ['console', 'syslog', 'file']
|
||||||
|
|
||||||
|
|
Reference in New Issue