From 2363af5782deab47d1f3bfab629d986191a27502 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 19 Jul 2005 02:22:11 +0000 Subject: [PATCH] Fixed #54 -- Corrected typos in urlconfs in docs/overview. Thanks, james! git-svn-id: http://code.djangoproject.com/svn/django/trunk@191 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/overview.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/overview.txt b/docs/overview.txt index 9e4327ef59..d21ce88081 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -169,13 +169,12 @@ Reporter/Article example, here's what that might look like:: from django.conf.urls.defaults import * urlpatterns = patterns('', - (r'^/articles/(?P\d{4})/$', 'myproject.news.views.articles.year_archive'), - (r'^/articles/(?P\d{4})/(?P\d{2})/$', 'myproject.news.views.articles.month_archive'), - (r'^/articles/(?P\d{4})/(?P\d{2})/$', 'myproject.news.views.articles.month_archive'), - (r'^/articles/(?P\d{4})/(?P\d{2})/(?P\d+)/$', 'myproject.news.views.articles.article_detail'), + (r'^/articles/(?P\d{4})/$', 'myproject.news.views.articles.year_archive'), + (r'^/articles/(?P\d{4})/(?P\d{2})/$', 'myproject.news.views.articles.month_archive'), + (r'^/articles/(?P\d{4})/(?P\d{2})/$', 'myproject.news.views.articles.month_archive'), + (r'^/articles/(?P\d{4})/(?P\d{2})/(?P\d+)/$', 'myproject.news.views.articles.article_detail'), ) - The code above maps URLs, as regular expressions, to the location of Python callback functions (views). The regular expressions use parenthesis to "capture" values from the URLs. When a user requests a page, Django runs through each