From aa54ac6d7d92eeea17f6a262780cc77e4c0fe555 Mon Sep 17 00:00:00 2001 From: Andy Kittner Date: Wed, 18 Apr 2012 16:41:12 +0200 Subject: [PATCH] Fix settings.py creation on python-2.5 (Closes #133) dir() was not overrideable on python2.5 so it doesn't trigger an import of the real settings module. Use getattr() instead, this works accross all versions. --- openslides/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides/main.py b/openslides/main.py index f9f81a9c3..dffacfdab 100644 --- a/openslides/main.py +++ b/openslides/main.py @@ -93,7 +93,7 @@ def prepare_openslides(always_syncdb = False): try: # settings is a lazy object, force the settings module # to be imported - dir(django.conf.settings) + getattr(django.conf.settings, "DATABASES", None) except ImportError: pass else: