mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
more careful database setting
This commit is contained in:
@@ -32,6 +32,13 @@ cat >>$SETTINGS_FILE <<EOF
|
||||
|
||||
import dj_database_url
|
||||
|
||||
DATABASES = {'default': dj_database_url.config(default='postgres://')}
|
||||
if 'DATABASES' not in locals():
|
||||
DATABASES = {}
|
||||
|
||||
if not 'default' in DATABASES:
|
||||
DATABASES['default'] = {}
|
||||
|
||||
DATABASES['default'].update(dj_database_url.config(default='postgres://'))
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user