Django Book 翻译
菜单>:
TOC
返回
原文:
A further shortcut you can take when using the string technique is to factor out a common view prefix. In our URLconf example, each of the view strings starts with ``'mysite.views'`` , which is redundant to type. We can factor out that common prefix and pass it as the first argument to ``patterns()`` , like this:
翻译:
当使用字符串技术时,你可以采用更简化的方式:提取出一个公共视图前缀。在我们的 URLconf 例子中,每一个视图字符串都是以 ``'mysite.views'`` 开始的,造成过多的输入。我们可以提取出公共前缀然后把它作为第一个参数传给 ``patterns()`` ,如:
备注:
译者: