[1.7.x] Fixed #22477 -- Removed contrib middleware from the global settings defaults.

Also added a compatibility check for changed middleware defaults.
This commit is contained in:
mlavin 2014-04-20 08:58:29 -04:00 committed by Tim Graham
parent d3bf537324
commit d94de802d3
9 changed files with 131 additions and 15 deletions

View file

@ -58,11 +58,12 @@ class AdminScriptTestCase(unittest.TestCase):
'ROOT_URLCONF',
'SECRET_KEY',
'TEST_RUNNER', # We need to include TEST_RUNNER, otherwise we get a compatibility warning.
'MIDDLEWARE_CLASSES', # We need to include MIDDLEWARE_CLASSES, otherwise we get a compatibility warning.
]
for s in exports:
if hasattr(settings, s):
o = getattr(settings, s)
if not isinstance(o, dict):
if not isinstance(o, (dict, tuple, list)):
o = "'%s'" % o
settings_file.write("%s = %s\n" % (s, o))