def show(): page = StaticPage(db, auth) page.render(None) html_page = page.show(slug_key=request.args(0)) if html_page is None: raise PRETTYHTTP(403, T("Page not found")) import os new_render = lambda text: render(text, path=os.path.join(request.folder, 'views'), context=dict(**globals())) return new_render(html_page)
def manage(): page = StaticPage(db, auth) page.render('/admin/pages/manage.html') return dict(grid=page.grid())