FTP_MASTERS=() # A tuple containing the *IP addresses* of all machines
# trusted to upload ftp structure data
VARNISH_PURGERS=() # Extra servers that can do varnish purges through our queue
+DO_ESI=False # Generate ESI tags
ARCHIVES_SEARCH_SERVER="archives.postgresql.org" # Where to post REST request for archives search
ARCHIVES_SEARCH_PLAINTEXT=False # Contact ARCHIVES_SEARCH_SERVER with http instead of https
FRONTEND_SMTP_RELAY="magus.postgresql.org" # Where to relay user generated email
if request.is_secure():
return {
'link_root': settings.SITE_ROOT,
+ 'do_esi': settings.DO_ESI,
'gitrev': gitrev,
}
else:
return {
'gitrev': gitrev,
+ 'do_esi': settings.DO_ESI,
}
initialize_template_collection()
def process_response(self, request, response):
- response['xkey'] = ' '.join(["pgwt_{0}".format(hashlib.md5(t).hexdigest()) for t in get_all_templates()])
+ tlist = get_all_templates()
+ if 'base/esi.html' in tlist:
+ response['x-do-esi'] = "1"
+ tlist.remove('base/esi.html')
+ if tlist:
+ response['xkey'] = ' '.join(["pgwt_{0}".format(hashlib.md5(t).hexdigest()) for t in tlist])
return response
--- /dev/null
+{%if do_esi %}<esi:include src="{{includepage}}/xx"/>{%else%}
+{%include "pages"|add:includepage|add:".html"%}
+{%endif%}