Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit afc19a6

Browse files
committed
Use the right middleware settings name for Django 1.10 and later
1 parent ce185ba commit afc19a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ckeditor_demo/settings.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,18 @@
7777
'ckeditor_demo.demo_application',
7878
)
7979

80-
MIDDLEWARE_CLASSES = (
80+
_MIDDLEWARE = (
8181
'django.contrib.sessions.middleware.SessionMiddleware',
8282
'django.middleware.common.CommonMiddleware',
8383
'django.middleware.csrf.CsrfViewMiddleware',
8484
'django.contrib.auth.middleware.AuthenticationMiddleware',
8585
'django.contrib.messages.middleware.MessageMiddleware',
8686
'django.middleware.clickjacking.XFrameOptionsMiddleware',
8787
)
88+
if django.VERSION >= (1, 10):
89+
MIDDLEWARE = _MIDDLEWARE
90+
else:
91+
MIDDLEWARE_CLASSES = _MIDDLEWARE
8892

8993
ROOT_URLCONF = 'ckeditor_demo.urls'
9094

0 commit comments

Comments
 (0)