Django Book 翻译
菜单>:
TOC
返回
原文:
But as a Django application grows in complexity, its URLconf grows, too, and keeping those imports can be tedious to manage. (For each new view function, you have to remember to import it, and the import statement tends to get overly long if you use this approach.) Its possible to avoid that tedium by importing the ``views`` module itself. This example URLconf is equivalent to the previous one:
翻译:
但随着 Django 应用变得复杂,它的 URLconf 也在增长,并且维护这些导入可能使得管理变麻烦。(对每个新的view函数,你不得不记住要导入它,并且如果采用这种方法导入语句将变得相当长。)有可能通过导入 ``views`` 模块本身来避免这个麻烦。这个 URLconf 示例同上一个是等价的:
备注:
译者: