Allow for direct URLs to abbreviated legacy PostgreSQL releases
authorJonathan S. Katz <jonathan.katz@excoventures.com>
Mon, 12 Oct 2020 18:00:09 +0000 (14:00 -0400)
committerJonathan S. Katz <jonathan.katz@excoventures.com>
Mon, 12 Oct 2020 18:03:24 +0000 (14:03 -0400)
commitf923e095352f1be55d0c3658e55472271ed4d8b3
treeefd90c7e89c5b8ae49d03455a169a1477267a980
parent311a6b28d3a94162a271a7f5127a55a56918e66d
Allow for direct URLs to abbreviated legacy PostgreSQL releases

For example, while a link to "/docs/release/9.1.0/" would work,
going to "/docs/release/9.1/" would not; in this case, it would
show the release details for "9.0.1". While the probability of
someone modifying the links to see the different release notes
is low, we would still need to take action on what is an
incorrect link.

Instead of returning a 404, this transposes the major/minor
version to point at the canonical version number and render the
expected page. This is set up to work for the 6, 7, 8, 9 series.

Reported by: Nikolay Samokhvalov <samokhvalov@gmail.com>
pgweb/docs/views.py