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.
This commit is contained in:
Andy Kittner 2012-04-18 16:41:12 +02:00
parent fbaa88c23a
commit aa54ac6d7d

View File

@ -93,7 +93,7 @@ def prepare_openslides(always_syncdb = False):
try: try:
# settings is a lazy object, force the settings module # settings is a lazy object, force the settings module
# to be imported # to be imported
dir(django.conf.settings) getattr(django.conf.settings, "DATABASES", None)
except ImportError: except ImportError:
pass pass
else: else: