summaryrefslogtreecommitdiff
path: root/pgweb
diff options
context:
space:
mode:
authorMagnus Hagander2022-02-06 12:37:31 +0000
committerMagnus Hagander2022-02-06 12:39:55 +0000
commitb0cd713640ded96973ffa104c9342e12b73cae54 (patch)
treeaa06298a1b96a52f3a86e087304222950840ceb0 /pgweb
parent7b15c8c2fba8d3a1921a605cc81b91b395c1f73e (diff)
Give priority to the "new style" of news links over the old
This affects how we redirect news when tehre's what looks like an "id" number both before and after. For example, the link: 2016-08-11-security-update-release-1688 would previously detect the id as 2017 and redirect to that article, which is obviously wrong. This changes the order so that id-at-the-end is checked first. This instead gives problems for urls that *end* in a year (or other things that looks like an id). This is not ideal, but it's better than before because at least now the links that are being generated *now* are handled the correct way.
Diffstat (limited to 'pgweb')
-rw-r--r--pgweb/urls.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pgweb/urls.py b/pgweb/urls.py
index 78b61cee..f349f0a1 100644
--- a/pgweb/urls.py
+++ b/pgweb/urls.py
@@ -35,8 +35,8 @@ urlpatterns = [
url(r'^about/$', pgweb.core.views.about),
url(r'^about/newsarchive/(?P<tag>[^/]*/)?(?P<paginator>[0-9]{8}/)?$', pgweb.news.views.archive),
- url(r'^about/news/(?P<itemid>\d+)(?P<slug>-.*)?/$', pgweb.news.views.item),
url(r'^about/news/(?P<slug>[^/]+)-(?P<itemid>\d+)/$', pgweb.news.views.item),
+ url(r'^about/news/(?P<itemid>\d+)(?P<slug>-.*)?/$', pgweb.news.views.item),
url(r'^about/news/taglist.json/$', pgweb.news.views.taglist_json),
url(r'^about/events/$', pgweb.events.views.main),
url(r'^about/eventarchive/$', pgweb.events.views.archive),