Django Book 翻译
菜单>:
TOC
返回
原文:
Once youve created flatpages, ``FlatpageFallbackMiddleware`` does all of the work. Each time any Django application raises a 404 error, this middleware checks the flatpages database for the requested URL as a last resort. Specifically, it checks for a flatpage with the given URL with a site ID that corresponds to the ``SITE_ID`` setting.
翻译:
一旦简单页面创建完成, ``FlatpageFallbackMiddleware`` 将完成(剩下)所有的工作。每当 Django 引发 404 错误,作为终极手段,该中间件将根据所请求的 URL 检查平页面数据库。确切地说,它将使用所指定的 URL以及 ``SITE_ID`` 设置对应的站点 ID 查找一个简单页面。
备注:
译者: