Fixed #24695 -- Tidied up a couple of regexes in the CBV docs

Thanks datakid for the report
This commit is contained in:
Alasdair Nicol 2015-04-24 11:13:51 +01:00 committed by Tim Graham
parent 618bc4e653
commit b9e972b961
2 changed files with 2 additions and 2 deletions

View File

@ -593,7 +593,7 @@ DateDetailView
from django.views.generic.dates import DateDetailView
urlpatterns = [
url(r'^(?P<year>[0-9]+)/(?P<month>[-\w]+)/(?P<day>[0-9]+)/(?P<pk>[0-9]+)/$',
url(r'^(?P<year>[0-9]{4})/(?P<month>[-\w]+)/(?P<day>[0-9]+)/(?P<pk>[0-9]+)/$',
DateDetailView.as_view(model=Article, date_field="pub_date"),
name="archive_date_detail"),
]

View File

@ -59,7 +59,7 @@ DetailView
from article.views import ArticleDetailView
urlpatterns = [
url(r'^(?P<slug>[-_\w]+)/$', ArticleDetailView.as_view(), name='article-detail'),
url(r'^(?P<slug>[-\w]+)/$', ArticleDetailView.as_view(), name='article-detail'),
]
**Example myapp/article_detail.html**: