From 3a97d1bd7a14815a503550c4deaccf2e0e300ceb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 17 Nov 2008 20:17:08 +0000 Subject: - Add chameleon text template API (chameleon ${name} renderings where the template does not need to be wrapped in any containing XML). Prep for 0.4.9. --- docs/api/template.rst | 22 +++++++++++++++++----- docs/conf.py | 4 ++-- docs/narr/templates.rst | 10 ++++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/api/template.rst b/docs/api/template.rst index 8cf63c91b..8685073c3 100644 --- a/docs/api/template.rst +++ b/docs/api/template.rst @@ -3,12 +3,12 @@ :mod:`repoze.bfg` Built-in Templating Facilties =============================================== -Three templating facilities are provided by :mod:`repoze.bfg` "out of -the box": :term:`ZPT` -style, :term:`Genshi` -style, and :term:`XSLT` -templating. +Four templating facilities are provided by :mod:`repoze.bfg` "out of +the box": :term:`ZPT` -style, :term:`Genshi` -style, text templating, +and :term:`XSLT` templating. -ZPT-style and Genshi-style templates are in :mod:`repoze.bfg` are -supported by the :term:`Chameleon` (nee :term:`z3c.pt`) templating +ZPT-style, Genshi-style, and text templates are in :mod:`repoze.bfg` +are supported by the :term:`Chameleon` (nee :term:`z3c.pt`) templating engine, which contains alternate implementations of both the ZPT and Genshi language specifications. @@ -32,6 +32,7 @@ statement, e.g.: from repoze.chameleon_zpt import render_template as zpt_render from repoze.chameleon_genshi import render_template as genshi_render + from repoze.chameleon_text import render_template as text_render :mod:`repoze.bfg.chameleon_zpt` ------------------------------- @@ -58,6 +59,17 @@ statement, e.g.: .. autofunction:: render_template_to_response +:mod:`repoze.bfg.chameleon_text` +---------------------------------- + +.. automodule:: repoze.bfg.chameleon_text + + .. autofunction:: get_template + + .. autofunction:: render_template + + .. autofunction:: render_template_to_response + :mod:`repoze.bfg.xslt` ---------------------- diff --git a/docs/conf.py b/docs/conf.py index d494ce20a..7d3991698 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,9 +51,9 @@ copyright = '2008, Agendaless Consulting' # other places throughout the built documents. # # The short X.Y version. -version = '0.4.8' +version = '0.4.9' # The full version, including alpha/beta/rc tags. -release = '0.4.8' +release = '0.4.9' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst index 4878e728c..48a9ac52e 100644 --- a/docs/narr/templates.rst +++ b/docs/narr/templates.rst @@ -136,6 +136,16 @@ application's configuration section, e.g.:: use = egg:MyProject#app reload_templates = true +Using Text Templates +-------------------- + +:mod:`repoze.bfg` also allows for the use of templates which are +composed entirely of non-XML text via :term:`Chameleon`. To do so, +you can create templates that are entirely composed of text except for +``${name}`` -style substitution points. The rendering API is a mirror +of the ZPT rendering facility, it's just imported from another place; +see :ref:`template_module` for more information. + Templating with other Templating Languages ------------------------------------------ -- cgit v1.2.3