mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-26 03:24:01 +03:00
rename MIDDLEWARE_CLASSES to MIDDLEWARE
This commit is contained in:
parent
ab52466f44
commit
f2aab6edc3
|
@ -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',
|
||||
|
|
|
@ -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', ]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user