我正在通过 IIS6 提供应用程序。发生错误,导致应用程序无法运行,我不能 100% 确定它可能是什么。
我相信以下内容是由 python 生成的,但我不完全确定。
<小时/>"A server error has occurred. Please contact the administrator"
对于弄清楚到底发生了什么有什么想法吗?
最佳答案
它看起来更像是网络服务器错误(500?)。
是否启用了调试?您应该能够看到异常消息和回溯。另外,检查 Web 服务器错误日志并定义 settings.ADMINS 。当禁用调试时,这在生产中很有用:
When DEBUG=False and a view raises an exception, Django will e-mail these people with the full exception information.
关于python - 调试Django时没有显示调试信息 | Django ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4068210/