chriscohoat/django-backup — pull request #1 by j4mie (2012-03-08 16:40:14+00:00)
Title: Fix DATABASE_*/DATABASES setting detection

Hi,

The code that detected multiple database-style settings (`settings.DATABASES` vs `settings.DATABASE_*`) was broken. In a Django 1.2+ project, the `settings` module still contains `settings.DATABASE_ENGINE`, `settings.DATABASE_NAME`, etc for backwards compatibility but they are set to empty strings. So the try/except block never reaches the except part.

This commit checks whether the `settings` module has a `DATABASES` property.