Skip to content

Commit 5767e0d

Browse files
author
Kenneth Reitz
committed
more careful database setting
1 parent eeb63f2 commit 5767e0d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bin/steps/django/injection

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ cat >>$SETTINGS_FILE <<EOF
3232
3333
import dj_database_url
3434
35-
DATABASES = {'default': dj_database_url.config(default='postgres://')}
35+
if 'DATABASES' not in locals():
36+
DATABASES = {}
37+
38+
if not 'default' in DATABASES:
39+
DATABASES['default'] = {}
40+
41+
DATABASES['default'].update(dj_database_url.config(default='postgres://'))
42+
3643
EOF
3744

0 commit comments

Comments
 (0)