mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-04 23:06:24 -04:00
49 lines
1.4 KiB
HTML
49 lines
1.4 KiB
HTML
<%!
|
|
from mako.ext.autohandler import autohandler
|
|
%>
|
|
<%inherit file="${autohandler(template, context)}"/>
|
|
<%page cached="True" cache_key="${self.filename}"/>
|
|
|
|
<%doc>
|
|
base.html - common to all documentation pages. intentionally separate
|
|
from autohandler, which can be swapped out for a different one
|
|
</%doc>
|
|
|
|
<%
|
|
# bootstrap TOC structure from request args, or pickled file if not present.
|
|
import cPickle as pickle
|
|
import os, time
|
|
#print "%s generating from table of contents for file %s" % (local.filename, self.filename)
|
|
filename = os.path.join(os.path.dirname(self.filename), 'table_of_contents.pickle')
|
|
toc = pickle.load(file(filename))
|
|
version = toc.version
|
|
last_updated = toc.last_updated
|
|
|
|
kwargs = context.kwargs
|
|
kwargs.setdefault('extension', 'html')
|
|
extension = kwargs['extension']
|
|
kwargs.setdefault('paged', True)
|
|
kwargs.setdefault('toc', toc)
|
|
|
|
version_cls = 'versionnum'
|
|
if 'beta' in version:
|
|
version_cls += ' prerelease'
|
|
%>
|
|
|
|
<div id="topanchor"><a name="top"> </a></div>
|
|
|
|
|
|
<h1>${toc.root.doctitle}</h1>
|
|
|
|
<div id="pagecontrol"><a href="index.${extension}">Multiple Pages</a> | <a href="documentation.${extension}">One Page</a></div>
|
|
|
|
<div class="versionheader">
|
|
Version: <span class="${version_cls}">${version}</span>
|
|
Last Updated: ${time.strftime('%x %X', time.localtime(last_updated))}
|
|
</div>
|
|
|
|
${next.body(**kwargs)}
|
|
|
|
|
|
|