Django

Code

Changeset 3505

Show
Ignore:
Timestamp:
07/31/06 21:23:24 (2 years ago)
Author:
adrian
Message:

Fixed inconsistency in docs/url_dispatch.txt with regard to matching docs/overview.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/url_dispatch.txt

    r2818 r3505  
    264264 
    265265    urlpatterns = patterns('', 
    266         (r'^articles/(\d{4})/$', 'myproject.news.views.year_archive'), 
    267         (r'^articles/(\d{4})/(\d{2})/$', 'myproject.news.views.month_archive'), 
    268         (r'^articles/(\d{4})/(\d{2})/(\d+)/$', 'myproject.news.views.article_detail'), 
    269     ) 
    270  
    271 In this example, each view has a common prefix -- ``'myproject.news.views'``. 
     266        (r'^articles/(\d{4})/$', 'mysite.news.views.year_archive'), 
     267        (r'^articles/(\d{4})/(\d{2})/$', 'mysite.news.views.month_archive'), 
     268        (r'^articles/(\d{4})/(\d{2})/(\d+)/$', 'mysite.news.views.article_detail'), 
     269    ) 
     270 
     271In this example, each view has a common prefix -- ``'mysite.news.views'``. 
    272272Instead of typing that out for each entry in ``urlpatterns``, you can use the 
    273273first argument to the ``patterns()`` function to specify a prefix to apply to 
     
    278278    from django.conf.urls.defaults import * 
    279279 
    280     urlpatterns = patterns('myproject.news.views', 
     280    urlpatterns = patterns('mysite.news.views', 
    281281        (r'^articles/(\d{4})/$', 'year_archive'), 
    282282        (r'^articles/(\d{4})/(\d{2})/$', 'month_archive'),