Skip to content

Commit

Permalink
WhiteNoise configuration needs to be in middleware and not in wsgi (#845
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tbaxter-18f authored Nov 1, 2018
1 parent 6ccc522 commit 5d4f129
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions tock/tock/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@


MIDDLEWARE = (
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
Expand Down
3 changes: 0 additions & 3 deletions tock/tock/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,5 @@ def initialize_newrelic():
initialize_newrelic()

from django.core.wsgi import get_wsgi_application
# important that the whitenoise import is after the line above
from whitenoise.django import DjangoWhiteNoise

application = get_wsgi_application()
application = DjangoWhiteNoise(application)

0 comments on commit 5d4f129

Please sign in to comment.