We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c36b795 commit 21d954eCopy full SHA for 21d954e
cms/utils/compat/dj.py
@@ -30,6 +30,6 @@ def get_apps():
30
31
32
def get_middleware():
33
- # order is important.
34
- # django sets MIDDLEWARE to None which prevents MIDDLEWARE_CLASSES from being used.
35
- return getattr(settings, 'MIDDLEWARE_CLASSES', getattr(settings, 'MIDDLEWARE'))
+ if getattr(settings, 'MIDDLEWARE', None) is None:
+ return settings.MIDDLEWARE_CLASSES
+ return settings.MIDDLEWARE
0 commit comments