简体   繁体   中英

Django app does not work when DEBUG=False and using django_heroku

I tried deploying my Django website using heroku and used a library called Django-Heroku. When setting my settings.py for deployment, it returns Server Error (500) when setting DEBUG = False , importing import django_heroku and writing django_heroku.settings(locals()) at the last line of my settings.py file. How can I check the settings set by django_heroku that disables my django website for production?

Note: it does not show any error when setting DEBUG=True and the django app works fine.

i had this problem too, and it will return you that error for specific template, if you try another template you should see that works, so btw, you need check your template for that specific url, maybe you forget some html element to close your tags! check it, fix it and push it again, it will work!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM