Kaydet (Commit) 73ea27cc authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Fixed bug in [191]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 2363af57
......@@ -169,10 +169,10 @@ Reporter/Article example, here's what that might look like::
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^/articles/(?P\d<year>{4})/$', 'myproject.news.views.articles.year_archive'),
(r'^/articles/(?P\d<year>{4})/(?P\d<month>{2})/$', 'myproject.news.views.articles.month_archive'),
(r'^/articles/(?P\d<year>{4})/(?P\d<month>{2})/$', 'myproject.news.views.articles.month_archive'),
(r'^/articles/(?P\d<year>{4})/(?P\d<month>{2})/(?P<day>\d+)/$', 'myproject.news.views.articles.article_detail'),
(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'),
)
The code above maps URLs, as regular expressions, to the location of Python
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment