diff --git a/settings.py b/settings.py index 757a09c..ff9be76 100644 --- a/settings.py +++ b/settings.py @@ -4,11 +4,13 @@ import dj_database_url BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -DATABASES = { - 'default': dj_database_url.config(default=DATABASE_URL) -} -if not DATABASE_URL: +DATABASES = {} + +if DATABASE_URL: + # Reads string from DATABASE_URL env by default + DATABASES['default'] = dj_database_url.config() +else: DATABASES['default'] = { 'ENGINE': 'django.db.backends.postgresql', 'NAME': DATABASE_NAME,