diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2005-07-21 18:12:29 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2005-07-21 18:12:29 +0000 |
| commit | 96d69c5b5faa07c3be471b9a9c849b40a305e5f4 (patch) | |
| tree | 8313f9b3cf63b5c4304ceb7251fac7790d30f3d6 | |
| parent | df6feb54f2e962d2ecaab370514f764317de1acf (diff) | |
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
| -rw-r--r-- | docs/url_dispatch.txt | 8 |
1 files 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<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 ======================== |
