# ---------------------------------------- # This supports permalinks with <article_pk> # NOTE: We cannot support /year/month/pk, /year/pk, or /pk, since these # patterns collide with the list/archive views, which we'd prefer to # continue to support. url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<pk>\d+)/', ArticleDetail.as_view(), name='article-detail'), # These support permalinks with <article_slug> url(r'^(?P<slug>\w[-\w]*)/', ArticleDetail.as_view(), name='article-detail'), url(r'^(?P<year>\d{4})/(?P<slug>\w[-\w]*)/', ArticleDetail.as_view(), name='article-detail'), url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<slug>\w[-\w]*)/', ArticleDetail.as_view(), name='article-detail'), url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/', # flake8: noqa ArticleDetail.as_view(), name='article-detail'), url(r'^author/(?P<author>\w[-\w]*)/', AuthorArticleList.as_view(), name='article-list-by-author'), url(r'^category/(?P<category>\w[-\w]*)/', CategoryArticleList.as_view(), name='article-list-by-category'), url(r'^category/(?P<category>\w[-\w]*)/feed/', CategoryFeed(), name='article-list-by-category-feed'), url(r'^tag/(?P<tag>\w[-\w]*)/', TagArticleList.as_view(), name='article-list-by-tag'), url(r'^tag/(?P<tag>\w[-\w]*)/feed/', TagFeed(), name='article-list-by-tag-feed'), ]
url(r'^(?P<category>\w[-\w]*)/(?P<slug>\w[-\w]*)/$', ArticleDetail.as_view(), name='article-detail'), url(r'^(?P<year>\d{4})/(?P<slug>\w[-\w]*)/$', ArticleDetail.as_view(), name='article-detail'), url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<slug>\w[-\w]*)/$', ArticleDetail.as_view(), name='article-detail'), url( r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$', # flake8: NOQA ArticleDetail.as_view(), name='article-detail'), url(r'^author/(?P<author>\w[-\w]*)/$', AuthorArticleList.as_view(), name='article-list-by-author'), #url(r'^(?P<category>\w[-\w]*)/$', # CategoryArticleList.as_view(), name='article-list-by-category'), #url(r'^(?P<category>\w[-\w]*)/feed/$', #CategoryFeed(), name='article-list-by-category-feed'), #url(r'^(?P<slug>\w[-\w]*)/$', #ArticleDetail.as_view(), name='article-detail'), url(r'^tags/tag/(?P<tag>\w[-\w]*)/$', TagArticleList.as_view(), name='article-list-by-tag'), url(r'^tags/tag/(?P<tag>\w[-\w]*)/feed/$', TagFeed(), name='article-list-by-tag-feed'), ]
# ---------------------------------------- # This supports permalinks with <article_pk> # NOTE: We cannot support /year/month/pk, /year/pk, or /pk, since these # patterns collide with the list/archive views, which we'd prefer to # continue to support. url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<pk>\d+)/$', ArticleDetail.as_view(), name='article-detail'), # These support permalinks with <article_slug> url(r'^(?P<slug>\w[-\w]*)/$', ArticleDetail.as_view(), name='article-detail'), url(r'^(?P<year>\d{4})/(?P<slug>\w[-\w]*)/$', ArticleDetail.as_view(), name='article-detail'), url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<slug>\w[-\w]*)/$', ArticleDetail.as_view(), name='article-detail'), url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$', # flake8: noqa ArticleDetail.as_view(), name='article-detail'), url(r'^author/(?P<author>\w[-\w]*)/$', AuthorArticleList.as_view(), name='article-list-by-author'), url(r'^category/(?P<category>\w[-\w]*)/$', CategoryArticleList.as_view(), name='article-list-by-category'), url(r'^category/(?P<category>\w[-\w]*)/feed/$', CategoryFeed(), name='article-list-by-category-feed'), url(r'^tag/(?P<tag>\w[-\w]*)/$', TagArticleList.as_view(), name='article-list-by-tag'), url(r'^tag/(?P<tag>\w[-\w]*)/feed/$', TagFeed(), name='article-list-by-tag-feed'), ]