mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Added support for django 1.4
This commit is contained in:
+9
-8
@@ -1,15 +1,15 @@
|
||||
#!/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
|
||||
[ -n "$SETTINGS_FILE" ] && (grep -Fiq "django" $BUILD_DIR/requirements.txt) && echo Python/Django || echo Python
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
#!/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
|
||||
|
||||
Reference in New Issue
Block a user