$def with (page=None) $ show_ol_shell = ctx.get('show_ol_shell', True) $ stats = stats_summary() $ raw_time = stats.get('total', {}).get('time') # Assumes that if total present, it's a dict $if raw_time is not None: $ total_time = float(raw_time) * 1000 $else: $ total_time = 0 $if show_ol_shell:
$if ("stats" in ctx.features) and query_param('debug'): $:render_template("site/stats") $if show_ol_shell: $:render_template("lib/nav_foot", page) $if any([path in request.canonical_url for path in ['/account/create', '/books/add', '/edit', '/books', '/contact']]):