repoze.bfg.chameleon_text

repoze.bfg.chameleon_text.get_template(path)
Return a chameleon text template at the package-relative path (may also be absolute).
repoze.bfg.chameleon_text.render_template(path, **kw)
Render a chameleon text 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_text.render_template_to_response(path, **kw)
Render a chameleon text 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 will work against template files which contain simple ${Genshi} - style replacement markers.

The API of repoze.bfg.chameleon_text is identical to that of repoze.bfg.chameleon_zpt; only its import location is different. If you need to import an API functions from this module as well as the repoze.bfg.chameleon_zpt 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

Glossary

Next topic

repoze.bfg.chameleon_zpt

This Page

Quick search