summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial04.txt
diff options
context:
space:
mode:
authorchriscauley <chris@lablackey.com>2014-04-14 14:12:44 -0400
committerTim Graham <timograham@gmail.com>2014-04-16 20:36:29 -0400
commit66ec9ee441618894c1ccebdcdd5eb4d7fbf4a6d3 (patch)
tree956a7d4f6e3b1c348505a3f2d23c7813c6c362b8 /docs/intro/tutorial04.txt
parent030dd4f72ca4d84c0a5e09ee625123d03651fdd1 (diff)
Fixed #22378 -- Updated \d to [0-9]+ in urlpatterns of docs and tests.
Thanks tomwys for the suggestion.
Diffstat (limited to 'docs/intro/tutorial04.txt')
-rw-r--r--docs/intro/tutorial04.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt
index 63d12d1a68..5b46dc0bb8 100644
--- a/docs/intro/tutorial04.txt
+++ b/docs/intro/tutorial04.txt
@@ -61,7 +61,7 @@ created a URLconf for the polls application that includes this line:
.. snippet::
:filename: polls/urls.py
- url(r'^(?P<question_id>\d+)/vote/$', views.vote, name='vote'),
+ url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, name='vote'),
We also created a dummy implementation of the ``vote()`` function. Let's
create a real version. Add the following to ``polls/views.py``:
@@ -228,9 +228,9 @@ First, open the ``polls/urls.py`` URLconf and change it like so:
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
- url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),
- url(r'^(?P<pk>\d+)/results/$', views.ResultsView.as_view(), name='results'),
- url(r'^(?P<question_id>\d+)/vote/$', views.vote, name='vote'),
+ url(r'^(?P<pk>[0-9]+)/$', views.DetailView.as_view(), name='detail'),
+ url(r'^(?P<pk>[0-9]+)/results/$', views.ResultsView.as_view(), name='results'),
+ url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, name='vote'),
]
Amend views