Django Book 翻译
菜单>:
TOC
返回
原文:
Django has a simple flag that controls the display of these error messages. If the ``DEBUG`` setting is set to ``True`` , error messages will be displayed in the browser. If not, Django will render return an HTTP 500 (Internal server error) message and render an error template that you provide. This error template is called ``500.html`` and should live in the root of one of your template directories.
翻译:
Django有一个简单的标志符,来控制这些出错信息显示与否。如果 ``DEBUG`` 被设置为 ``True`` ,错误消息就会显示在浏览器中。否则,Django会返回一个 HTTP 500(内部服务器错误)的消息, 并显示你所提供的出错页面。这个错误的模板叫 ``500.html`` ,并且这个文件需要保存在你的某个模板目录的根目录中。
备注:
译者: