mirror of
https://github.com/django/django.git
synced 2025-04-26 18:24:36 +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
@ -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…
x
Reference in New Issue
Block a user