Browse Source

Make it explicit that whitenoise is being used

As per http://whitenoise.evans.io/en/stable/django.html#enable-whitenoise,
the whitenoise middleware should be added just after the django-security
middleware.
pull/78/head
Clemens Wolff 5 years ago
parent
commit
fef4b40770
1 changed files with 3 additions and 0 deletions
  1. 3
      app/app/settings.py

3
app/app/settings.py

@ -55,6 +55,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@ -88,6 +89,8 @@ STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'server/static'),
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
WSGI_APPLICATION = 'app.wsgi.application'
AUTHENTICATION_BACKENDS = [

Loading…
Cancel
Save