Ensure release notes from older version still load without 404 errors.
authorJonathan S. Katz <jonathan.katz@excoventures.com>
Wed, 13 Feb 2019 20:22:49 +0000 (15:22 -0500)
committerJonathan S. Katz <jonathan.katz@excoventures.com>
Fri, 8 Mar 2019 19:19:33 +0000 (11:19 -0800)
commitba529fe1ded5c2d66e6910e779dfe218b2944e4c
treef7d2a2d848a10240bbcf9ee9e3c4f4f275fc531f
parentc884493494e5a29691bc85cb6c085c9cb0caecf8
Ensure release notes from older version still load without 404 errors.

An upcoming change in PostgreSQL keeps only release notes in their
current versions. So e.g., PostgreSQL 11 only has the release notes
for 11.0, 11.1, 11.2 etc.

Thus, for PostgreSQL 9.4 on up, any URLs such as /docs/10/release-9-6-8.html
would return a 404. Additonal, URLs with /current/ and /devel/ would break
as well.

This patch prevents these 404s from occuring by redirecting users accessing
release notes in the 9.4 and above documentation to the older versions
of the release notes by redirecting them to the notes in the specific
version. So in the above example, a user would be redirect to
/docs/9.6/release-9-6-8.html

As we do not have documentation on the website past 7.2, any release
notes from an older version are redirected to the release notes tree
in 7.2
pgweb/docs/views.py