Skip to content
This repository
tag: 1.2
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 29 lines (19 sloc) 0.861 kb

:mod:`pyramid.chameleon_zpt`

System Message: ERROR/3 (<string>, line 3); backlink

Unknown interpreted text role "mod".

System Message: ERROR/3 (<string>, line 6)

Unknown directive type "automodule".

.. automodule:: pyramid.chameleon_zpt

  .. autofunction:: get_template

  .. autofunction:: render_template

  .. autofunction:: render_template_to_response

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

System Message: ERROR/3 (<string>, line 14); backlink

Unknown interpreted text role "term".

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

System Message: ERROR/3 (<string>, line 17); backlink

Unknown interpreted text role "mod".

System Message: ERROR/3 (<string>, line 17); backlink

Unknown interpreted text role "mod".

System Message: ERROR/3 (<string>, line 17); backlink

Unknown interpreted text role "mod".

System Message: ERROR/3 (<string>, line 24)

Error in "code-block" directive: unknown option: "linenos".

.. code-block:: python
   :linenos:

   from pyramid.chameleon_zpt import render_template as zpt_render
   from pyramid.chameleon_text import render_template as text_render
Something went wrong with that request. Please try again.