$def with (page=None) $ cssfile = ctx.get('cssfile', 'user') $ 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 cssfile == 'user' or 'admin': $if ("stats" in ctx.features) and query_param('debug'): $:render_template("site/stats") $:render_template("lib/nav_foot", page) $if any([path in request.canonical_url for path in ['/account/create', '/books/add', '/edit', '/books', '/contact']]):