def static_html(template): try: return render_template('%s.html' % template) except TemplateNotFound: page = utils.get_page(template) if page is None: abort(404) return render_template('page.html', content=markdown(page.html))
def static_html(template): page = utils.get_page(template) if page is None: abort(404) else: if page.auth_required and utils.authed() is False: return redirect(url_for('auth.login', next=request.path)) return render_template('page.html', content=markdown(page.html))