Django Book 翻译
菜单>:
TOC
返回
原文:
Here, both URL patterns point to the same view ``views.page`` but the first pattern doesnt capture anything from the URL. If the first pattern matches, the ``page()`` function will use its default argument for ``num`` , ``"1"`` . If the second pattern matches, ``page()`` will use whatever ``num`` value was captured by the regular expression.
翻译:
在这里,两个URL表达式都指向了同一个视图 ``views.page`` ,但是第一个表达式没有传递任何参数。如果匹配到了第一个样式, ``page()`` 函数将会对参数 ``num`` 使用默认值 ``"1"`` ,如果第二个表达式匹配成功, ``page()`` 函数将使用正则表达式传递过来的num的值。
备注:
译者: