mirror of
https://github.com/django/django.git
synced 2025-08-20 10:40:32 +00:00
[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:
parent
d3bf537324
commit
d94de802d3
9 changed files with 131 additions and 15 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue