from django.template.defaultfilters import stringfilter
from django import template
+from django.utils.safestring import mark_safe
import json
if str(major_version) in ['0', '1']:
return str(minor_version)[2:4]
return minor_version
+
+
+@register.simple_tag(takes_context=True)
+def git_changes_link(context):
+ return mark_safe('<a href="https://git.postgresql.org/gitweb/?p=pgweb.git;a=history;f=templates/{}">View</a> change history.'.format(context.template_name))
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}Code of Conduct{%endblock%}
{%block contents%}
<div class="col-lg-9">
<h1>Code of Conduct <i class="fas fa-gavel"></i></h1>
- <p><em>Last updated: August 18, 2018</em></p>
+ <p><em>Last updated: August 18, 2018. {%git_changes_link%}</em></p>
<h2>Introduction</h2>
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}Code of Conduct Committee{%endblock%}
{%block contents%}
<h1>Code of Conduct Committee <i class="fas fa-users"></i></h1>
-<p><i>Last updated: October 17, 2019</i></p>
+<p><i>Last updated: October 17, 2019. {%git_changes_link%}</i></p>
<h3>Contact</h3>
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}Funds Group{%endblock%}
{%block contents%}
<h1>PostgreSQL Funds Group <i class="far fa-money-bill-alt"></i></h1>
-<p><em>Last updated: March 1, 2019</em></p>
+<p><em>Last updated: March 1, 2019. {%git_changes_link%}</em></p>
<h2 id="charter">Charter</h2>
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}News and Events Approval Policy{%endblock%}
{%block contents%}
<h1>News and Events Approval Policy <i class="fas fa-gavel"></i></h1>
-<p><em>Last updated: March 29, 2018</em></p>
+<p><em>Last updated: March 29, 2018. {%git_changes_link%}</em></p>
<h2>Policies for Approving News & Events & pgsql-announce</h2>
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}Planet PostgreSQL{%endblock%}
{%block contents%}
<h1>Planet PostgreSQL <i class="fas fa-gavel"></i></h1>
-<p><em>Last updated: October 12, 2016</em></p>
+<p><em>Last updated: October 12, 2016. {%git_changes_link%}</em></p>
<p><a href="https://planet.postgresql.org/">Planet PostgreSQL</a> is a blog
aggregation service run by the PostgreSQL community. In addition to the main
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}Privacy Policy{%endblock%}
{%block contents%}
<h1>Privacy Policy <i class="fas fa-gavel"></i></h1>
-<p><em>Last updated: December 10, 2012</em></p>
+<p><em>Last updated: December 10, 2012. {%git_changes_link%}</em></p>
<p>When you visit our website, our servers automatically log your IP address
and/or host name.</p>
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}Project Name{%endblock%}
{%block contents%}
<h1>Project Name <i class="fas fa-gavel"></i></h1>
-<p><em>Last updated: July 5, 2018</em></p>
+<p><em>Last updated: July 5, 2018. {%git_changes_link%}</em></p>
<h2>"PostgreSQL" versus "Postgres"</h2>
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}Professional Services and Hosting Approval Policy{%endblock%}
{%block contents%}
<h1>Professional Services and Hosting Approval Policy <i class="fas fa-gavel">
</i></h1>
-<p><em>Last updated: May 19, 2012</em></p>
+<p><em>Last updated: May 19, 2012. {%git_changes_link%}</em></p>
<h2>Policies for Approving Professional Services and Hosting Services</h2>
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}Sponsoring{%endblock%}
{%block contents%}
<h1>PostgreSQL Sponsorship <i class="fas fa-gavel"></i></h1>
-<p><em>Last updated: June 1, 2018</em></p>
+<p><em>Last updated: June 1, 2018. {%git_changes_link%}</em></p>
<h2>Sponsorship levels</h2>
{%extends "base/page.html"%}
-{%block title%}Trademark Policy{%endblock%}
+{%load pgfilters%}
+'{%block title%}Trademark Policy{%endblock%}
{%block contents%}
<h1>Trademark Policy <i class="fas fa-gavel"></i></h1>
-<p><em>Last updated: August 28, 2018</em></p>
+<p><em>Last updated: August 28, 2018. {%git_changes_link%}</em></p>
<h2>Policy</h2>
{%extends "base/page.html"%}
+{%load pgfilters%}
{%block title%}@postgresql Twitter Account Policy{%endblock%}
{%block contents%}
<h1>@postgresql Twitter Account Policy <i class="fas fa-gavel"></i></h1>
-<p><em>Last updated: January 19, 2018</em></p>
+<p><em>Last updated: January 19, 2018. {%git_changes_link%}</em></p>
<p>This policy applies to the manual use of the @postgresql Twitter account.</p>