File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121
2222[ " $NAME " = " Python/Django" ] || exit 0
2323
24- MANAGE_FILE=$( cd $BUILD_DIR && find . -maxdepth 2 -type f -name ' manage.py' | head -1)
24+ MANAGE_FILE=$( cd $BUILD_DIR && find . -maxdepth 3 -type f -name ' manage.py' | head -1)
2525MANAGE_FILE=${MANAGE_FILE: 2}
2626PROJECT=$( dirname $MANAGE_FILE )
2727
Original file line number Diff line number Diff line change 33set +e
44
55# Check if collectstatic is configured.
6- python $PROJECT /manage.py collectstatic --help & > /dev/null && RUN_COLLECTSTATIC=true
6+ python $MANAGE_FILE collectstatic --help & > /dev/null && RUN_COLLECTSTATIC=true
77
88# Don't raise errors if SILENCE_COLLECTSTATIC is set.
99if [ ! " $SILENCE_COLLECTSTATIC " ]; then
1010 set -e
1111fi
1212
13- # Compile assets if collectstatic appears to be .
13+ # Compile assets if collectstatic appears to be kosher .
1414if [ " $RUN_COLLECTSTATIC " ]; then
1515 echo " -----> Collecting static files"
16- python $PROJECT /manage.py collectstatic --noinput --verbosity=0 | indent
16+ python $MANAGE_FILE collectstatic --noinput --verbosity=0 | indent
1717
1818 [ $? -ne 0 ] && {
1919 echo " ! Error running manage.py collectstatic. More info:"
@@ -22,6 +22,4 @@ if [ "$RUN_COLLECTSTATIC" ]; then
2222else
2323 echo " ! Django collecstatic is not configured. Learn more:"
2424 echo " http://devcenter.heroku.com/articles/django-assets"
25- fi
26-
27- env
25+ fi
Original file line number Diff line number Diff line change 22
33SETTINGS_FILE=$( find . -maxdepth 3 -type f -name ' settings.py' | head -1)
44PROJECT=$( dirname $SETTINGS_FILE )
5+ MANAGE_FILE=$( find . -maxdepth 3 -type f -name ' manage.py' | head -1)
6+ MANAGE_FILE=${MANAGE_FILE: 2}
57
68# Disable injection for new applications.
79if [ -f .heroku/injection_disabled ]; then
810 DISABLE_INJECTION=1
911fi
1012
11- export SETTINGS_FILE PROJECT DISABLE_INJECTION
13+ export SETTINGS_FILE MANAGE_FILE PROJECT DISABLE_INJECTION
1214
1315if [ ! " $DISABLE_INJECTION " ]; then
1416 source $BIN_DIR /steps/django/injection
You can’t perform that action at this time.
0 commit comments