From f2aab6edc3ddbe3dd003041f39c0a28cce6f01b4 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:28:33 -0300 Subject: [PATCH] rename MIDDLEWARE_CLASSES to MIDDLEWARE --- {{cookiecutter.project_slug}}/config/settings/common.py | 2 +- {{cookiecutter.project_slug}}/config/settings/local.py | 2 +- .../config/settings/production.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index c9433416..ef2d53b3 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -53,7 +53,7 @@ INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS # MIDDLEWARE CONFIGURATION # ------------------------------------------------------------------------------ -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index e6fd99f8..c72d3af1 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -50,7 +50,7 @@ CACHES = { # django-debug-toolbar # ------------------------------------------------------------------------------ -MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) +MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',) INSTALLED_APPS += ('debug_toolbar', ) INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ] diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 2201c3fc..7fa726f6 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -42,11 +42,11 @@ INSTALLED_APPS += ('raven.contrib.django.raven_compat', ) # Use Whitenoise to serve static files # See: https://whitenoise.readthedocs.io/ WHITENOISE_MIDDLEWARE = ('whitenoise.middleware.WhiteNoiseMiddleware', ) -MIDDLEWARE_CLASSES = WHITENOISE_MIDDLEWARE + MIDDLEWARE_CLASSES +MIDDLEWARE = WHITENOISE_MIDDLEWARE + MIDDLEWARE {% endif %} {%- if cookiecutter.use_sentry_for_error_reporting == 'y' -%} RAVEN_MIDDLEWARE = ('raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware', ) -MIDDLEWARE_CLASSES = RAVEN_MIDDLEWARE + MIDDLEWARE_CLASSES +MIDDLEWARE = RAVEN_MIDDLEWARE + MIDDLEWARE {% endif %} {%- if cookiecutter.use_opbeat == 'y' -%} # opbeat integration @@ -57,9 +57,9 @@ OPBEAT = { 'APP_ID': env('DJANGO_OPBEAT_APP_ID'), 'SECRET_TOKEN': env('DJANGO_OPBEAT_SECRET_TOKEN') } -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'opbeat.contrib.django.middleware.OpbeatAPMMiddleware', -) + MIDDLEWARE_CLASSES +) + MIDDLEWARE {% endif %} # SECURITY CONFIGURATION