diff --git a/bin/steps/django b/bin/steps/django index cb6dbb350ba2f2ae6e50e32d95bf4a441c546512..74cce91e5c61d15ee96982511f06d521a6a4e900 100755 --- a/bin/steps/django +++ b/bin/steps/django @@ -1,5 +1,5 @@ #!/usr/bin/env bash -echo "-----> Django settings injection" +echo "-----> Injecting Django settings..." SETTINGS_FILE=$(ls **/settings.py | head -1) PROJECT=$(dirname $SETTINGS_FILE) @@ -46,3 +46,14 @@ except Exception: print 'Unexpected error:', sys.exc_info() EOF + + +# Compile assets. +echo "-----> Collecting static files" +python $PROJECT/manage.py collectstatic --noinput | indent + +[ $? -ne 0 ] && { + echo " ! Error running manage.py collectstatic. See http://devcenter.heroku.com/articles/django-assets for more info." +} + +set -e