Django Book 翻译
菜单>:
TOC
返回
原文:
This middleware only gets activated for 404 (page not found) errors not for 500 (server error) or other error responses. Also note that the order of ``MIDDLEWARE_CLASSES`` matters. Generally, you can put ``FlatpageFallbackMiddleware`` at or near the end of the list, because its a last resort.
翻译:
该中间件仅在发生 404 (页面未找到)错误时被激活,而不会在 500 (服务器错误)或其他错误响应时被激活。还要注意的是必须考虑 ``MIDDLEWARE_CLASSES`` 的顺序问题。通常,你可以把 ``FlatpageFallbackMiddleware`` 放在列表最后,因为它是一种终极手段。
备注:
译者: