mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
dj-database-url
This commit is contained in:
+7
-1
@@ -18,8 +18,10 @@ if [ -f settings.py ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "-----> Injecting Django settings..."
|
||||
echo "-----> Installing dj-database-url..."
|
||||
pip install --use-mirrors dj-database-url | indent
|
||||
|
||||
echo "-----> Injecting Django settings..."
|
||||
|
||||
SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1)
|
||||
PROJECT=$(dirname $SETTINGS_FILE)
|
||||
@@ -30,5 +32,9 @@ cat >>$SETTINGS_FILE <<EOF
|
||||
|
||||
import dj_database_url
|
||||
|
||||
if 'DATABASES' not in locals():
|
||||
DATABASES = {}
|
||||
|
||||
DATABASES = dj_database_url.config(DATABASES)
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user