Skip to content

Commit

Permalink
+APP_COLLECTSTATIC
Browse files Browse the repository at this point in the history
  • Loading branch information
wooyek committed Nov 24, 2017
1 parent 0605c0f commit 702ae38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@
"value": "True"
},
"DISABLE_COLLECTSTATIC": {
"description": "Controls if Heroku should collect any static files. Set it to 1 if you keep static in repo.",
"description": "Controls if Heroku should collect any static files. This won't work with example_project.",
"value": 1
},
"APP_COLLECTSTATIC": {
"description": "Make example project collect statics on it'sown.",
"value": 1,
"required": false
},
"DJANGO_SETTINGS_MODULE": {
Expand Down
6 changes: 6 additions & 0 deletions bin/post_deploy
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ if [[ -n "$CREATE_SUPER_USER" ]]; then
printf "from django.contrib.auth.models import User\nif not User.objects.exists(): User.objects.create_superuser(*'$CREATE_SUPER_USER'.split(':'))" | python /app/example_project/manage.py shell
fi

if [[ -n "$APP_COLLECTSTATIC" ]]; then
echo "==> Collecting static"
cd /app/example_project/src
python /app/example_project/manage.py collectstatic
fi

0 comments on commit 702ae38

Please sign in to comment.