Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #54 -- Corrected typos in urlconfs in docs/overview. Thanks, ja…

…mes!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2363af5782deab47d1f3bfab629d986191a27502 1 parent 8f4fa5a
Adrian Holovaty authored

Showing 1 changed file with 4 additions and 5 deletions. Show diff stats Hide diff stats

  1. 9  docs/overview.txt
9  docs/overview.txt
@@ -169,13 +169,12 @@ Reporter/Article example, here's what that might look like::
169 169
     from django.conf.urls.defaults import *
170 170
 
171 171
     urlpatterns = patterns('',
172  
-        (r'^/articles/(?P\d{4})/$',                   'myproject.news.views.articles.year_archive'),
173  
-        (r'^/articles/(?P\d{4})/(?P\d{2})/$',         'myproject.news.views.articles.month_archive'),
174  
-        (r'^/articles/(?P\d{4})/(?P\d{2})/$',         'myproject.news.views.articles.month_archive'),
175  
-        (r'^/articles/(?P\d{4})/(?P\d{2})/(?P\d+)/$', 'myproject.news.views.articles.article_detail'),
  172
+        (r'^/articles/(?P\d<year>{4})/$', 'myproject.news.views.articles.year_archive'),
  173
+        (r'^/articles/(?P\d<year>{4})/(?P\d<month>{2})/$', 'myproject.news.views.articles.month_archive'),
  174
+        (r'^/articles/(?P\d<year>{4})/(?P\d<month>{2})/$', 'myproject.news.views.articles.month_archive'),
  175
+        (r'^/articles/(?P\d<year>{4})/(?P\d<month>{2})/(?P<day>\d+)/$', 'myproject.news.views.articles.article_detail'),
176 176
     )
177 177
 
178  
-
179 178
 The code above maps URLs, as regular expressions, to the location of Python
180 179
 callback functions (views). The regular expressions use parenthesis to "capture"
181 180
 values from the URLs. When a user requests a page, Django runs through each

0 notes on commit 2363af5

Please sign in to comment.
Something went wrong with that request. Please try again.