[英]django admin working only debug true mode?
I have problem with DEBUG
mode. 我有
DEBUG
模式的问题。 If I set the DEBUG=True
,Then my django admin dashboard working perfectly. 如果我设置
DEBUG=True
,那么我的django管理仪表板工作正常。 But when I changed the DEBUG=False
,Then it gives the following error, 但当我更改
DEBUG=False
,它会给出以下错误,
A server error occurred. Please contact the administrator.
Note: I am currently running my app in dev mode. 注意:我目前正在开发模式下运行我的应用程序。 But I don't need to run my app in
DEBUG=True
mode. 但我不需要在
DEBUG=True
模式下运行我的应用程序。
Could it be ALLOWED_HOSTS
? 它可以是
ALLOWED_HOSTS
吗? This trips up lots of people when they finally deploy and turn off DEBUG
for the first time. 当他们最终部署并首次关闭
DEBUG
,这会使很多人绊倒。 https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.