Commit bea5b491 authored by Andrés Torres's avatar Andrés Torres

Added support for django 1.4

parent b67a0404
#!/usr/bin/env bash
# This script serves as the
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
# detector.
#
# A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
# This script serves as the
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
# detector.
#
# A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
# adapter between a Python application and Heroku's runtime.
# ## Usage
# Compiling an app into a slug is simple:
#
#
# $ bin/detect <build-dir> <cache-dir>
BUILD_DIR=$1
......@@ -25,9 +25,10 @@ if [ ! -f $BUILD_DIR/requirements.txt ]; then
exit 0
fi
# `Python/Django` if `**/settings.py` is present and `django` exists in
# `Python/Django` if `**/settings.py` is present and `django` exists in
# `requirements.txt`.
#
# Otherwise, `Python`.
SETTINGS_FILE=$(find $BUILD_DIR/. -maxdepth 3 -type f -name 'settings.py' | head -1)
ls $BUILD_DIR/**/settings.py &> /dev/null && (grep -Fiq "django" $BUILD_DIR/requirements.txt) && echo Python/Django || echo Python
\ No newline at end of file
[ -n "$SETTINGS_FILE" ] && (grep -Fiq "django" $BUILD_DIR/requirements.txt) && echo Python/Django || echo Python
\ No newline at end of file
#!/usr/bin/env bash
# This script serves as the Django build step of the
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
# compiler.
#
# A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
# compiler.
#
# A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
# adapter between a Python application and Heroku's runtime.
#
# This script is invoked by [`bin/compile`](/).
......@@ -21,7 +21,7 @@ fi
echo "-----> Injecting Django settings..."
SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1)
SETTINGS_FILE=$(find . -maxdepth 3 -type f -name 'settings.py' | head -1)
PROJECT=$(dirname $SETTINGS_FILE)
echo "Injecting code into $SETTINGS_FILE to read from DATABASE_URL" | indent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment