Getting Django PROD ready best practice on Heroku
<p>I have recently run into some problems flipping off Debug mode on my Heroku instance of Django (filled from the Heroku Django template).</p>

<p>I have begun diving through the specific Heroku logs. However, was wondering if anyone has already made a checklist for things one should do after turning off Debug mode on Heroku (allowed hosts, email services etc)?</p>

<p>Not specific to Heroku, but I've made the following checklist. You may want to checkout <a href="http://djangodeployment.com/2016/10/18/checklist-for-django-settings-on-deployment/" rel="nofollow">the original list</a>, which expands on static files and links the settings to the Django documentation.</p>

<ul>
<li><strong>Databases.</strong> Set DATABASES to your production database.</li>
<li><strong>Allowed hosts.</strong> Set ALLOWED_HOSTS to the list of domain names to be served by this Django installation. It should be the same list as that listed in nginxâs server_name or in apacheâs ServerName and ServerAlias.</li>
<li><strong>Static files.</strong> Set STATIC_ROOT to the directory where the static files should be stored, and STATIC_URL to the URL where they will be found (commonly /static/). Donât forget to run collectstatic.</li>
<li><strong>Media files.</strong> Same thing as static files, but also make sure that the user Django is running as has permission to write to MEDIA_ROOT.</li>
<li><strong>Email.</strong> Regardless whether your project uses email or not, it is very important to set this up so that it can send you information about internal server errors. So you need to use EMAIL_HOST, EMAIL_PORT, EMAIL_HOST_USER, EMAIL_HOST_PASSWORD, EMAIL_USE_TLS, DEFAULT_FROM_EMAIL, and SERVER_EMAIL. Also set up ADMINS and MANAGERS.</li>
<li><strong>Miscellaneous.</strong> Other settings you probably need to set different from development are SECRET_KEY, LOGGING, CACHES. Finally, set DEBUG to False.</li>
</ul>

python django debugging heroku