From b2e952f3b8447e7795e1f80c741f99a7546badd3 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Fri, 17 Dec 2021 18:14:50 +1100 Subject: [PATCH] Fix URLconfs causing Django check warnings. --- www/conservancy/apps/blog/urls.py | 2 +- www/conservancy/apps/news/urls.py | 2 +- www/conservancy/urls.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/www/conservancy/apps/blog/urls.py b/www/conservancy/apps/blog/urls.py index 4b084f7b..128afbfc 100644 --- a/www/conservancy/apps/blog/urls.py +++ b/www/conservancy/apps/blog/urls.py @@ -17,7 +17,7 @@ urlpatterns = [ url(r'^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/$', BlogDayArchiveView.as_view(**info_dict)), url(r'^(?P\d{4})/(?P[a-z]{3})/$', BlogMonthArchiveView.as_view(**info_dict)), url(r'^(?P\d{4})/$', BlogYearArchiveView.as_view(**info_dict)), - url(r'^/?$', custom_index, dict(info_dict, paginate_by=4)), + url(r'^$', custom_index, dict(info_dict, paginate_by=4)), url(r'^query/$', query), ] diff --git a/www/conservancy/apps/news/urls.py b/www/conservancy/apps/news/urls.py index 1d621f12..abe8ba1e 100644 --- a/www/conservancy/apps/news/urls.py +++ b/www/conservancy/apps/news/urls.py @@ -36,5 +36,5 @@ urlpatterns = [ url(r'^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/$', NewsDayArchiveView.as_view(**info_dict)), url(r'^(?P\d{4})/(?P[a-z]{3})/$', NewsMonthArchiveView.as_view(**info_dict)), url(r'^(?P\d{4})/$', NewsYearArchiveView.as_view(**info_dict)), - url(r'^/?$', listing, dict(info_dict, paginate_by=6)), + url(r'^$', listing, dict(info_dict, paginate_by=6)), ] diff --git a/www/conservancy/urls.py b/www/conservancy/urls.py index 96a8bf98..573c0ec6 100644 --- a/www/conservancy/urls.py +++ b/www/conservancy/urls.py @@ -37,8 +37,8 @@ urlpatterns = [ url(r'^feeds/news/?$', feeds.PressReleaseFeed()), url(r'^feeds/omnibus/?$', feeds.OmnibusFeed()), url(r'^feeds/?$', feeds.view), - url(r'^news(?:/|$)', include('conservancy.apps.news.urls')), - url(r'^blog(?:/|$)', include('conservancy.apps.blog.urls')), + url(r'^news/', include('conservancy.apps.news.urls')), + url(r'^blog/', include('conservancy.apps.blog.urls')), # formerly static templated things... (dirs with templates) url(r'^error/(40[134]|500)(?:/index\.html|/|)$', static_views.handler), url(r'^error', static_views.index),