mirror of
https://github.com/django/django.git
synced 2025-09-29 13:34:57 +00:00
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:
parent
5dd9a2ab38
commit
41a6e41777
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ class LazySettings(object):
|
||||||
# __setattr__(), which would be an infinite loop.
|
# __setattr__(), which would be an infinite loop.
|
||||||
self.__dict__['_target'] = value
|
self.__dict__['_target'] = value
|
||||||
else:
|
else:
|
||||||
|
if self._target is None:
|
||||||
|
self._import_settings()
|
||||||
setattr(self._target, name, value)
|
setattr(self._target, name, value)
|
||||||
|
|
||||||
def _import_settings(self):
|
def _import_settings(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue