Cookiecutter-django: Heroku Deployment Clarifications

Created on 15 Jul 2017  路  5Comments  路  Source: pydanny/cookiecutter-django

Is there a need to set the DJANGO_ADMIN_URL twice? Reference: https://github.com/pydanny/cookiecutter-django/blob/master/docs/deployment-on-heroku.rst

Also, how do you get around the Heroku buildpack looking for the requirements.txt file in root? Reference: https://devcenter.heroku.com/articles/python-pip

Most helpful comment

This can be closed now. Thanks @wasabigeek!

PS: Next time you can auto-close the issue by using a keyword in the pull request.

All 5 comments

One of the suggestions in Two Scoops of Django is to change the default admin URL for security. (Two Scoops of Django 1.8, pg 343).

When the project is created, there IS a requirements.txt in root. Since Cookiecutter only needs that for PAAS's in production, it points to requirements/production.txt.

Thanks @jlgimeno.

On the admin URL, could you help me understand how setting the URL twice helps?

heroku config:set DJANGO_ADMIN_URL="$(openssl rand -base64 32)"
...
heroku config:set DJANGO_ADMIN_URL=\^somelocation/

On Heroku, my bad, I missed that since I started the project without support for Heroku but now want to use it.

I'd also like to add that it's necessary to set DJANGO_SENTRY_DSN

The second Admin URL was added by https://github.com/pydanny/cookiecutter-django/pull/371 but the first one was left there, causing duplication. The DJANGO_SENTRY_DSN is only needed if you select use_sentry_for_error_reporting=y.

Feel free to send a Pull Request to update the documentation, it's all in the file you've linked to.

This can be closed now. Thanks @wasabigeek!

PS: Next time you can auto-close the issue by using a keyword in the pull request.

Was this page helpful?
0 / 5 - 0 ratings