repoze.bfg.chameleon_zpt

repoze.bfg.chameleon_zpt.get_template(path)
Return a chameleon.zpt template at the package-relative path (may also be absolute).
repoze.bfg.chameleon_zpt.render_template(path, **kw)
Render a chameleon.zpt template at the package-relative path (may also be absolute) using the kwargs in *kw as top-level names and return a string.
repoze.bfg.chameleon_zpt.render_template_to_response(path, **kw)
Render a chameleon.zpt template at the package-relative path (may also be absolute) using the kwargs in *kw as top-level names and return a Response object with the body as the template result.

These APIs will work against files which supply template text which matches the ZPT specification.

The API of repoze.bfg.chameleon_zpt is identical to that of repoze.bfg.chameleon_text; only its import location is different. If you need to import an API functions from this module as well as the repoze.bfg.chameleon_text module within the same view file, use the as feature of the Python import statement, e.g.:

from repoze.chameleon_zpt import render_template as zpt_render
from repoze.chameleon_text import render_template as text_render

Previous topic

repoze.bfg.chameleon_text

Next topic

repoze.bfg.events

This Page