PageRenderTime 92ms CodeModel.GetById 24ms app.highlight 1ms RepoModel.GetById 57ms app.codeStats 1ms

/kai/templates/docs/load_content.mako

https://bitbucket.org/bbangert/kai/
Mako | 30 lines | 28 code | 2 blank | 0 comment | 4 complexity | 5050dc3d1188e8980ecff836452bbe62 MD5 | raw file
 1<%
 2file_content = None
 3try:
 4    try:
 5        file_content = open(c.url)
 6        doc_content = file_content.read()
 7    except:
 8        h.redirect_to('/')
 9finally:
10    if file_content:
11        file_content.close()
12
13try:
14    doc_content = doc_content.decode('utf-8')
15except:
16    doc_content = doc_content.decode('utf-8', 'ignore')
17%>
18<div class="yui-b sphinx content">
19% if c.version < g.current_version:
20<div class="admonition warning">
21<p class="first admonition-title">Warning</p>
22<p class="last">This documentation does not refer to the most recent version of Pylons. <a href="http://wiki.pylonshq.com/display/pylonsdocs/Home">Current Documentation</a></p>
23</div>
24% endif
25
26${doc_content | n}
27</div>
28<%def name="title()">${parent.title()} - Docs</%def>
29<%def name="nav()">Docs</%def>
30<%inherit file="/layout.mako"/>