Skip to content

Commit

Permalink
DATABASES setting is not available for pre 1.2 versions of the django.
Browse files Browse the repository at this point in the history
"if settings.DATABASES"-statement will raise AttributeError when
used with earlier versions of the django.
  • Loading branch information
polac authored and Windmill Testing Framework committed Nov 10, 2010
1 parent 1a482c1 commit d5b951c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion windmill/authoring/djangotest.py
Expand Up @@ -80,7 +80,7 @@ def run(self):
# Must do database stuff in this new thread if database in memory.
from django.conf import settings
create_db = False
if settings.DATABASES:
if hasattr(settings, 'DATABASES') and settings.DATABASES:
# Django > 1.2
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.sqlite3' or \
settings.DATABASES['default']['TEST_NAME']:
Expand Down

0 comments on commit d5b951c

Please sign in to comment.