Fixed #24695 -- Tidied up a couple of regexes in the CBV docs
Thanks datakid for the report
This commit is contained in:
parent
618bc4e653
commit
b9e972b961
|
@ -593,7 +593,7 @@ DateDetailView
|
||||||
from django.views.generic.dates import DateDetailView
|
from django.views.generic.dates import DateDetailView
|
||||||
|
|
||||||
urlpatterns = [
|
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"),
|
DateDetailView.as_view(model=Article, date_field="pub_date"),
|
||||||
name="archive_date_detail"),
|
name="archive_date_detail"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -59,7 +59,7 @@ DetailView
|
||||||
from article.views import ArticleDetailView
|
from article.views import ArticleDetailView
|
||||||
|
|
||||||
urlpatterns = [
|
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**:
|
**Example myapp/article_detail.html**:
|
||||||
|
|
Loading…
Reference in New Issue