为什么在django设置中将debug设置为false会停止在开发和生产中加载Heroku应用程序? [英] Why does setting debug to false in django settings stop Heroku app from loading in development and production?
本文介绍了为什么在django设置中将debug设置为false会停止在开发和生产中加载Heroku应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的设置中,我设置了 DEBUG = False
,但是这会在dev和production中产生500错误。所以我环顾四周,并遇到这(设置DEBUG =假造成500错误 a>)并试用过。
In my settings i have set DEBUG=False
but this instead generated a 500 Error in both dev and production. so i looked around and came across this (Setting DEBUG = False causes 500 Error) and tried it out.
ALLOWED_HOSTS = ['www.heroku.com']
但这不起作用,我没做对吗?与Heroku一起托管
But this did not work, what am i not doing right? Am hosting with heroku
推荐答案
您的应用不在www.heroku.com上托管。请尝试
Your app is not hosted on www.heroku.com. Instead, try
ALLOWED_HOSTS = [".herokuapp.com"]
这篇关于为什么在django设置中将debug设置为false会停止在开发和生产中加载Heroku应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文