From 96d69c5b5faa07c3be471b9a9c849b40a305e5f4 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Thu, 21 Jul 2005 18:12:29 +0000 Subject: [PATCH] Updated url dispatch docs to make it more clear that the prefix need not end in a dot git-svn-id: http://code.djangoproject.com/svn/django/trunk@282 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/url_dispatch.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/url_dispatch.txt b/docs/url_dispatch.txt index 9916f49346..14bf67be92 100644 --- a/docs/url_dispatch.txt +++ b/docs/url_dispatch.txt @@ -21,7 +21,6 @@ Here's the example from that overview:: 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'), ) @@ -33,10 +32,15 @@ above example could be written more concisely as:: urlpatterns = patterns('myproject.news.views.articles', (r'^/articles/(?P\d{4})/$', 'year_archive'), (r'^/articles/(?P\d{4})/(?P\d{2})/$', 'month_archive'), - (r'^/articles/(?P\d{4})/(?P\d{2})/$', 'month_archive'), (r'^/articles/(?P\d{4})/(?P\d{2})/(?P\d+)/$', 'article_detail'), ) +.. admonition:: Note + + More precisely, the actual view function use is ``prefix + "." + + function_name``; that is, the trailing "dot" does not need to be put in the + prefix. Django: saving you time, one keystroke at a time. + Including other URLconfs ========================