Preventing VowsSettings inception leading to a possible infinite recursion
This commit is contained in:
parent
b36c86526e
commit
96a08e7914
1 changed files with 4 additions and 2 deletions
|
@ -22,9 +22,11 @@ class SettingsTracker(object):
|
|||
result = apply(self.real_import, (name, globals, locals, fromlist, level))
|
||||
fromlist = (fromlist or [])
|
||||
if name == 'django.conf' and 'settings' in fromlist:
|
||||
result.settings = VowsSettings(result.settings)
|
||||
if type(result.settings) != VowsSettings:
|
||||
result.settings = VowsSettings(result.settings)
|
||||
elif name == 'django' and 'conf' in fromlist:
|
||||
result.conf.settings = VowsSettings(result.conf.settings)
|
||||
if type(result.conf.settings) != VowsSettings:
|
||||
result.conf.settings = VowsSettings(result.conf.settings)
|
||||
return result
|
||||
|
||||
class VowsSettings(object):
|
||||
|
|
Reference in a new issue