From 41a6e41777a9d02cfcbfed534ebf4199158c7030 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Mon, 16 Jul 2007 04:45:45 +0000 Subject: [PATCH] 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 --- django/conf/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/conf/__init__.py b/django/conf/__init__.py index 021ecc81310..f28da2d7648 100644 --- a/django/conf/__init__.py +++ b/django/conf/__init__.py @@ -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):