Kaydet (Commit) b9e972b9 authored tarafından Alasdair Nicol's avatar Alasdair Nicol Kaydeden (comit) Tim Graham

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

Thanks datakid for the report
üst 618bc4e6
......@@ -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"),
]
......
......@@ -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**:
......
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