简体   繁体   English

django flatpages适用于DEBUG = True,不适用于DEBUG = False

[英]django flatpages works with DEBUG=True, doesn't work with DEBUG=False

I can see that django looks for 500.html when DEBUG is False . 我可以看到,当DEBUGFalse时,django会查找500.html What could be the problem? 可能是什么问题呢?

When debug is set to False django renders the 500.html template instead of the debug stack-trace thing. 当debug设置为False时,django呈现500.html模板而不是debug堆栈跟踪信息。

It might be that on a http 404 (not found) exception it tries to render the 404.html template and if it's not found than tries with the 500.html (internal error). 可能是在http 404(未找到)异常上,它尝试呈现404.html模板;如果未找到,则尝试呈现500.html(内部错误)。

It is not a problem in itself but just a configuration. 它本身不是问题,而只是配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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