diff --git a/bin/compile b/bin/compile index de6350e7aaa9f85f080236a17bed79a8bd84fe03..4288ccebfdda550e9dc5beced4ea288214fa2324 100755 --- a/bin/compile +++ b/bin/compile @@ -96,9 +96,6 @@ if [ ! -f requirements.txt ]; then echo "-e ." > requirements.txt fi -# Reject a Django app that appears to be packaged incorrectly. -grep -Fiq "django" requirements.txt) && [ -f settings.py ] && { puts-warn "Django app must be in a package subdirectory"; exit 1; } - # ### The Cache mkdir -p $CACHE_DIR diff --git a/bin/steps/django b/bin/steps/django index b7a54a988c9a5504d6e96da16850485c514d0b5e..c00ba58e04b8ff6b3402c5c244906a0e4c836de5 100755 --- a/bin/steps/django +++ b/bin/steps/django @@ -9,8 +9,18 @@ # # This script is invoked by [`bin/compile`](/). +# ## Sanity Checks +# + +# Reject a Django app that appears to be packaged incorrectly. +if [ -f settings.py ]; then + echo " ! Django app must be in a package subdirectory" + exit 1 +fi + echo "-----> Injecting Django settings..." + SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1) PROJECT=$(dirname $SETTINGS_FILE)