def home(): """Index page - without renderer""" return render( doctype("html"), e.html()( e.head()(e.title()("htmldoom rendering framework demo")), e.body()( e.h1()("Home page"), e.a(href="/jinja2")("Jinja2"), e.br(), e.a(href="/htmldoom")("htmldoom"), ), ), )
def home(request): """Index page - without renderer""" return Response( render( doctype("html"), e.html()( e.head()(e.title()("Pyramid template engine demo")), e.body()( e.h1()("Home page"), e.a(href="/jinja2")("Jinja2"), e.br(), e.a(href="/htmldoom")("htmldoom"), ), ), ))
from htmldoom import doctype, renders from htmldoom.yaml_loader import loadyaml as ly LAYOUTS_DIR = "docs/src/layouts" @renders(doctype("html"), ly(f"{LAYOUTS_DIR}/fullpage.yml", "default")) def document(**values): """The document renderer.""" return values