dj-database-url

This commit is contained in:
Kenneth Reitz
2012-04-30 14:00:51 -04:00
parent 233df5d59d
commit cf36e8c7cb
+7 -1
View File
@@ -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