Fixed #4884 -- Fixed an initialisation problem when assigned to settings before

accessing them. Thanks, Noam Raphael.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-07-16 04:45:45 +00:00
parent 5dd9a2ab38
commit 41a6e41777
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ class LazySettings(object):
# __setattr__(), which would be an infinite loop.
self.__dict__['_target'] = value
else:
if self._target is None:
self._import_settings()
setattr(self._target, name, value)
def _import_settings(self):