summaryrefslogtreecommitdiff
path: root/docs/api/chameleon_text.rst
blob: 51e5fc58c7e0d7216a1bc95810eb1597e25e0650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.. _chameleon_text_module:

:mod:`repoze.bfg.chameleon_text`
----------------------------------

.. automodule:: repoze.bfg.chameleon_text

  .. autofunction:: get_template

  .. autofunction:: render_template

  .. autofunction:: render_template_to_response

These APIs will will work against template files which contain simple
``${Genshi}`` - style replacement markers.

The API of :mod:`repoze.bfg.chameleon_text` is identical to that of
:mod:`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 :mod:`repoze.bfg.chameleon_zpt` module within the same
view file, use the ``as`` feature of the Python import statement,
e.g.:

.. code-block:: python
   :linenos:

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