Give priority to the "new style" of news links over the old
authorMagnus Hagander <magnus@hagander.net>
Sun, 6 Feb 2022 12:37:31 +0000 (13:37 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 6 Feb 2022 12:39:55 +0000 (13:39 +0100)
commitb0cd713640ded96973ffa104c9342e12b73cae54
treeaa06298a1b96a52f3a86e087304222950840ceb0
parent7b15c8c2fba8d3a1921a605cc81b91b395c1f73e
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.
pgweb/urls.py