Render list of supported versions on the main page
authorMagnus Hagander <magnus@hagander.net>
Sat, 7 Jan 2012 12:09:20 +0000 (13:09 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 7 Jan 2012 12:09:20 +0000 (13:09 +0100)
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
pgweb/urls.py
templates/support/versioning.html [moved from templates/pages/support/versioning.html with 50% similarity]

index f6930cf78055262bad0894df62b9f0f54c8402d4..d3d62fbfd7096057e8e1bcc437b3a2a1a4c21006 100644 (file)
@@ -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
index 04a356265cc969ceed8c66a50d079b7a32626532..3248c2086bfbd469d58819ae6e1ec994cc8f487e 100644 (file)
@@ -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'),
similarity index 50%
rename from templates/pages/support/versioning.html
rename to templates/support/versioning.html
index faa6adeadc5cb55723cfdc68f82d4edce49e9d2a..fcfabe33469e210364c9e0a656bcf47a3e5db04b 100644 (file)
@@ -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.
 </p>
 
-<p>The <a href="http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy">PostgreSQL release support policy</a>
-explains the support lifecycle you can expect from the community for a given PostgreSQL major release.</p>
+<h2>PostgreSQL release support policy</h2>
+<p>
+The PostgreSQL project aims to fully support a major release for
+<b>five years</b>.
+</p>
+
+<p>
+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.
+</p>
+
+<p>
+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.
+</p>
+
+<h2>End Of Life (EOL) dates</h2>
+<div class="tblBasic">
+ <table border="0" cellpadding="0" cellspacing="0" class="tblBasicGrey">
+  <tr>
+   <th class="colFirst">Version</th>
+   <th class="colMid">Current minor</th>
+   <th class="colMid">Supported</th>
+   <th class="colMid">First release date</th>
+   <th class="colLast">EOL date</th>
+  </tr>
+
+{%for v in versions%}
+  <tr {%if forloop.last%}class="lastrow"{%endif%}>
+   <td class="colFirst">{{v.tree}}</td>
+   <td class="colMid">{{v.tree}}.{{v.latestminor}}</td>
+   <td class="colMid">{{v.supported|yesno:"Yes,No"}}</td>
+   <td class="colMid">{{v.firstreldate|date:"F Y"}}</td>
+   <td class="colLast">{{v.eoldate|date:"F Y"}}</td>
+  </tr>
+{%endfor%}
+ </table>
+</div>
 {%endblock%}