summaryrefslogtreecommitdiff
path: root/docs/ref/models
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/ref/models
parent030dd4f72ca4d84c0a5e09ee625123d03651fdd1 (diff)
Fixed #22378 -- Updated \d to [0-9]+ in urlpatterns of docs and tests.
Thanks tomwys for the suggestion.
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/instances.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index 2a93996d8d..9bc7b841c7 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -642,7 +642,7 @@ template tag and a high-level wrapper for the
An example should make it clear how to use ``permalink()``. Suppose your URLconf
contains a line such as::
- (r'^people/(\d+)/$', 'people.views.details'),
+ (r'^people/([0-9]+)/$', 'people.views.details'),
...your model could have a :meth:`~django.db.models.Model.get_absolute_url`
method that looked like this::
@@ -655,7 +655,7 @@ method that looked like this::
Similarly, if you had a URLconf entry that looked like::
- (r'/archive/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', archive_view)
+ (r'/archive/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2})/$', archive_view)
...you could reference this using ``permalink()`` as follows::
@@ -684,7 +684,7 @@ pattern tuple by a call to the ``url`` function)::
from django.conf.urls import url
- url(r'^people/(\d+)/$', 'blog_views.generic_detail', name='people_view'),
+ url(r'^people/([0-9]+)/$', 'blog_views.generic_detail', name='people_view'),
...and then using that name to perform the reverse URL resolution instead
of the view name::