Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Fixed warning with unnecessary dollar for routers #517

Merged
merged 1 commit into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changelog

* Updated translations
* Fixed error when page with attached menu without apphook was not working
* Removed the dollar from the routes


2.2.1 (2019-02-12)
Expand Down
34 changes: 16 additions & 18 deletions aldryn_newsblog/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@


urlpatterns = [
url(r'^$',
ArticleList.as_view(), name='article-list'),
url(r'^feed/$', LatestArticlesFeed(), name='article-list-feed'),
url(r'^', ArticleList.as_view(), name='article-list'),
url(r'^feed/', LatestArticlesFeed(), name='article-list-feed'),

url(r'^search/$',
url(r'^search/',
ArticleSearchResultsList.as_view(), name='article-search'),

url(r'^(?P<year>\d{4})/$',
url(r'^(?P<year>\d{4})/',
YearArticleList.as_view(), name='article-list-by-year'),
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/',
MonthArticleList.as_view(), name='article-list-by-month'),
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/',
DayArticleList.as_view(), name='article-list-by-day'),

# Various permalink styles that we support
Expand All @@ -29,29 +28,28 @@
# 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+)/$',
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]*)/$',
url(r'^(?P<slug>\w[-\w]*)/',
ArticleDetail.as_view(), name='article-detail'),
url(r'^(?P<year>\d{4})/(?P<slug>\w[-\w]*)/$',
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]*)/$',
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
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]*)/$',
url(r'^author/(?P<author>\w[-\w]*)/',
AuthorArticleList.as_view(), name='article-list-by-author'),

url(r'^category/(?P<category>\w[-\w]*)/$',
url(r'^category/(?P<category>\w[-\w]*)/',
CategoryArticleList.as_view(), name='article-list-by-category'),
url(r'^category/(?P<category>\w[-\w]*)/feed/$',
url(r'^category/(?P<category>\w[-\w]*)/feed/',
CategoryFeed(), name='article-list-by-category-feed'),

url(r'^tag/(?P<tag>\w[-\w]*)/$',
url(r'^tag/(?P<tag>\w[-\w]*)/',
TagArticleList.as_view(), name='article-list-by-tag'),
url(r'^tag/(?P<tag>\w[-\w]*)/feed/$',
url(r'^tag/(?P<tag>\w[-\w]*)/feed/',
TagFeed(), name='article-list-by-tag-feed'),

]