Django Book 翻译
菜单>:
TOC
返回
原文:
Why put the custom view *before* the admin inclusion? Recall that Django processes URL patterns in order. The admin inclusion matches nearly anything that falls under the inclusion point, so if we reverse the order of those lines, Django will find a built-in admin view for that pattern, which wont work. In this particular case, it will try to load a change list for a ``Report`` model in the ``books`` application, which doesnt exist.
翻译:
为什么要将定制试图置于管理内容 *之前* 呢?回想一下,Django 是按照顺序处理 URL 匹配式的。管理内容几乎匹配内容点之后所有的东西,因此如果我们把这几行的顺序颠倒一下, Django 将会为该匹配式找到一个内建管理视图,并将试图在 ``books`` 应用程序中为 ``Report`` 模型再入更新列表,而这却是不存在的。
备注:
译者: