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:
parent
fbaa88c23a
commit
aa54ac6d7d
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user