Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 96d69c5b5faa07c3be471b9a9c849b40a305e5f4 1 parent df6feb5
Jacob Kaplan-Moss authored July 21, 2005

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. 8  docs/url_dispatch.txt
8  docs/url_dispatch.txt
@@ -21,7 +21,6 @@ Here's the example from that overview::
21 21
     urlpatterns = patterns('',
22 22
         (r'^/articles/(?P<year>\d{4})/$', 'myproject.news.views.articles.year_archive'),
23 23
         (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'myproject.news.views.articles.month_archive'),
24  
-        (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'myproject.news.views.articles.month_archive'),
25 24
         (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/$', 'myproject.news.views.articles.article_detail'),
26 25
     )
27 26
 
@@ -33,10 +32,15 @@ above example could be written more concisely as::
33 32
     urlpatterns = patterns('myproject.news.views.articles',
34 33
         (r'^/articles/(?P<year>\d{4})/$', 'year_archive'),
35 34
         (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'month_archive'),
36  
-        (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'month_archive'),
37 35
         (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/$', 'article_detail'),
38 36
     )
39 37
 
  38
+.. admonition:: Note
  39
+
  40
+    More precisely, the actual view function use is ``prefix + "." +
  41
+    function_name``; that is, the trailing "dot" does not need to be put in the
  42
+    prefix.  Django: saving you time, one keystroke at a time.
  43
+
40 44
 Including other URLconfs
41 45
 ========================
42 46
 

0 notes on commit 96d69c5

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