Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@jacobian jacobian authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 docs/url_dispatch.txt
View
8 docs/url_dispatch.txt
@@ -21,7 +21,6 @@ Here's the example from that overview::
urlpatterns = patterns('',
(r'^/articles/(?P<year>\d{4})/$', 'myproject.news.views.articles.year_archive'),
(r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'myproject.news.views.articles.month_archive'),
- (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'myproject.news.views.articles.month_archive'),
(r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\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<year>\d{4})/$', 'year_archive'),
(r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'month_archive'),
- (r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'month_archive'),
(r'^/articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\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
========================
Please sign in to comment.
Something went wrong with that request. Please try again.