There was an error while loading. Please reload this page.
1 parent 233df5d commit cf36e8cCopy full SHA for cf36e8c
bin/steps/django
@@ -18,8 +18,10 @@ if [ -f settings.py ]; then
18
exit 1
19
fi
20
21
-echo "-----> Injecting Django settings..."
+echo "-----> Installing dj-database-url..."
22
+pip install --use-mirrors dj-database-url | indent
23
24
+echo "-----> Injecting Django settings..."
25
26
SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1)
27
PROJECT=$(dirname $SETTINGS_FILE)
@@ -30,5 +32,9 @@ cat >>$SETTINGS_FILE <<EOF
30
32
31
33
import dj_database_url
34
35
+if 'DATABASES' not in locals():
36
+ DATABASES = {}
37
+
38
+DATABASES = dj_database_url.config(DATABASES)
39
EOF
40
0 commit comments