z3c.pt.pagetemplate

PageTemplate* constructors create templates from XML files.

class z3c.pt.pagetemplate.PageTemplate(body: bytes | str, **config: Unpack[PageTemplateConfig])

Page Templates using TAL, TALES, and METAL.

This class is suitable for standalone use or class property. Keyword-arguments are passed into the template as-is.

Initialize with a template string.

class z3c.pt.pagetemplate.PageTemplateFile(filename, path=None, content_type=None, **kwargs)

Page Templates using TAL, TALES, and METAL.

This class is suitable for standalone use or class property. Keyword-arguments are passed into the template as-is.

Initialize with a filename.

z3c.pt.loader

A template loader class is provided (for use with Pylons and other platforms).

class z3c.pt.loader.TemplateLoader(search_path: Sequence[str] | str | None = None, default_extension: str | None = None, **kwargs: Any)