瀏覽代碼

Added warning in tutorial 4 that the regex capture group name has changed.

Rikki 10 年之前
父節點
當前提交
731f313d60
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      docs/intro/tutorial04.txt

+ 3 - 0
docs/intro/tutorial04.txt

@@ -233,6 +233,9 @@ First, open the ``polls/urls.py`` URLconf and change it like so:
         url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, name='vote'),
     ]
 
+Note that the name of the matched pattern in the regexes of the second and third
+patterns has changed from ``<question_id>`` to ``<pk>``.
+
 .. _tutorial04-amend-views:
 
 Amend views