mirror of
https://github.com/django/django.git
synced 2025-01-13 11:57:01 +00:00
Added comment explaining nonobvious self.__dict__ assignment in django.conf.__init__.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
88ca662e75
commit
268462d686
@ -33,6 +33,8 @@ class LazySettings:
|
|||||||
|
|
||||||
def __setattr__(self, name, value):
|
def __setattr__(self, name, value):
|
||||||
if name == '_target':
|
if name == '_target':
|
||||||
|
# Assign directly to self.__dict__, because otherwise we'd call
|
||||||
|
# __setattr__(), which would be an infinite loop.
|
||||||
self.__dict__['_target'] = value
|
self.__dict__['_target'] = value
|
||||||
else:
|
else:
|
||||||
setattr(self._target, name, value)
|
setattr(self._target, name, value)
|
||||||
|
Loading…
Reference in New Issue
Block a user