From 08b9ac643f17f0011c68548b01620dd178cbb72b Mon Sep 17 00:00:00 2001
From: Magnus Hagander
Date: Sat, 7 Jan 2012 13:09:20 +0100
Subject: [PATCH] Render list of supported versions on the main page
Now that we have more metadata, we can render this on the main page instead of
on the wiki. This commit copies all the text from the current wiki page, and
uses the new fields in the Version model to render the table on the same URL
as the reference was on before.
---
pgweb/core/views.py | 5 ++
pgweb/urls.py | 1 +
templates/{pages => }/support/versioning.html | 47 ++++++++++++++++++-
3 files changed, 51 insertions(+), 2 deletions(-)
rename templates/{pages => }/support/versioning.html (50%)
diff --git a/pgweb/core/views.py b/pgweb/core/views.py
index f6930cf7..d3d62fbf 100644
--- a/pgweb/core/views.py
+++ b/pgweb/core/views.py
@@ -73,6 +73,11 @@ def community(request):
'planet': planet,
}, NavContext(request, 'community'))
+# List of supported versions
+def versions(request):
+ return render_to_response('support/versioning.html', {
+ 'versions': Version.objects.filter(tree__gt=0),
+ }, NavContext(request, 'support'))
re_staticfilenames = re.compile("^[0-9A-Z/_-]+$", re.IGNORECASE)
# Generic fallback view for static pages
diff --git a/pgweb/urls.py b/pgweb/urls.py
index 04a35626..3248c208 100644
--- a/pgweb/urls.py
+++ b/pgweb/urls.py
@@ -61,6 +61,7 @@ urlpatterns = patterns('',
(r'^support/professional_(support|hosting)/$', 'profserv.views.root'),
(r'^support/professional_(support|hosting)[/_](.*)/$', 'profserv.views.region'),
(r'^support/submitbug/$', 'misc.views.submitbug'),
+ (r'^support/versioning/$', 'core.views.versions'),
(r'^about/sponsors/$', 'pgweb.sponsors.views.sponsors'),
(r'^about/servers/$', 'pgweb.sponsors.views.servers'),
diff --git a/templates/pages/support/versioning.html b/templates/support/versioning.html
similarity index 50%
rename from templates/pages/support/versioning.html
rename to templates/support/versioning.html
index faa6adea..fcfabe33 100644
--- a/templates/pages/support/versioning.html
+++ b/templates/support/versioning.html
@@ -24,6 +24,49 @@ Minor releases are numbered by increasing the third part of the version number,
Upgrading to a minor release does not require a dump and restore; merely stop the database server, install the updated binaries, and restart the server. For some releases, manual changes may be required to complete the upgrade, so always read the release notes before upgrading.
-The PostgreSQL release support policy
-explains the support lifecycle you can expect from the community for a given PostgreSQL major release.
+PostgreSQL release support policy
+
+The PostgreSQL project aims to fully support a major release for
+five years.
+
+
+
+After a release falls out of full support, we may (at our committers'
+discretion) continue to apply further critical fixes to the source code,
+on a best-effort basis. No formal releases or binary packages will be
+produced by the project, but the updated source code will be available
+from our source code control system.
+
+
+
+This policy will be followed on a best-effort basis. In extreme cases it
+may not be possible to support a release for the planned lifetime; for
+example if a serious bug is found that cannot be resolved in a given major
+version without significant risk to the stability of the code or loss of
+application compatibility. In such cases, early retirement of a major
+version may be required.
+
+
+End Of Life (EOL) dates
+
+
+
+ | Version |
+ Current minor |
+ Supported |
+ First release date |
+ EOL date |
+
+
+{%for v in versions%}
+
+ | {{v.tree}} |
+ {{v.tree}}.{{v.latestminor}} |
+ {{v.supported|yesno:"Yes,No"}} |
+ {{v.firstreldate|date:"F Y"}} |
+ {{v.eoldate|date:"F Y"}} |
+
+{%endfor%}
+
+
{%endblock%}
--
2.39.5