Django Book 翻译
菜单>:
TOC
返回
原文:
In all of our URLconf examples so far, weve used simple, *non-named* regular expression groups that is, we put parentheses around parts of the URL we wanted to capture, and Django passes that captured text to the view function as a positional argument. In more advanced usage, its possible to use *named* regular expression groups to capture URL bits and pass them as *keyword* arguments to a view.
翻译:
到目前为止,在所有 URLconf 例子中,我们使用的很简单,即 *无命名* 正则表达式组,在我们想要捕获的URL部分上加上小括号,Django 会将捕获的文本作为位置参数传递给视图函数。在更高级的用法中,还可以使用 *命名* 正则表达式组来捕获URL,并且将其作为 *关键字* 参数传给视图。
备注:
译者: