summaryrefslogtreecommitdiff
path: root/docs/narr/templates.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2008-12-21 20:49:45 +0000
committerChris McDonough <chrism@agendaless.com>2008-12-21 20:49:45 +0000
commitb65d8eacda1da9105b027e8e02e95be13854061a (patch)
tree782bce7935f9bab4821baa49d59f42a43bd1a062 /docs/narr/templates.rst
parent931387988788d33bfc9d6052d61611c9657e9905 (diff)
downloadpyramid-b65d8eacda1da9105b027e8e02e95be13854061a.tar.gz
pyramid-b65d8eacda1da9105b027e8e02e95be13854061a.tar.bz2
pyramid-b65d8eacda1da9105b027e8e02e95be13854061a.zip
- Updated paster template "ez_setup.py" to one that requires
setuptools 0.6c9. - Turn ``view_execution_permitted`` from the :mod:`repoze.bfg.view` module into a documented API. - Doc cleanups.
Diffstat (limited to 'docs/narr/templates.rst')
-rw-r--r--docs/narr/templates.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst
index 48a9ac52e..fcddb55dd 100644
--- a/docs/narr/templates.rst
+++ b/docs/narr/templates.rst
@@ -13,7 +13,7 @@ its default and best-supported templating language. However,
:mod:`repoze.bfg` uses a different implementation of the :term:`ZPT`
specification than Zope does: the :term:`Chameleon`
:term:`chameleon.zpt` templating engine. This templating engine
-complies with the `Zope Page Template
+complies largely with the `Zope Page Template
<http://wiki.zope.org/ZPT/FrontPage>`_ template specification and is
significantly faster.
@@ -27,7 +27,7 @@ significantly faster.
:mod:`repoze.bfg`.
Given that there is a :term:`chameleon.zpt` template named
-``foo.html`` in a directory in your application named ``templates``,
+``foo.pt`` in a directory in your application named ``templates``,
you can render the template from a view like so:
.. code-block:: python
@@ -35,12 +35,12 @@ you can render the template from a view like so:
from repoze.bfg.chameleon_zpt import render_template_to_response
def sample_view(context, request):
- return render_template_to_response('templates/foo.html', foo=1, bar=2)
+ return render_template_to_response('templates/foo.pt', foo=1, bar=2)
The first argument to ``render_template_to_response`` shown above (and
its sister function ``render_template``, not shown, which just returns
a string body) is the template *path*. Above, the path
-``templates/foo.html`` is *relative*. Relative to what, you ask?
+``templates/foo.pt`` is *relative*. Relative to what, you ask?
Relative to the directory in which the ``views.py`` file which names
it lives, which is usually the :mod:`repoze.bfg` application's
:term:`package` directory.
@@ -59,7 +59,7 @@ string manually as a response body:
from repoze.bfg.chameleon_zpt import render_template
from webob import Response
def sample_view(context, request):
- result = render_template('templates/foo.html', foo=1, bar=2)
+ result = render_template('templates/foo.pt', foo=1, bar=2)
response = Response(result)
response.content_type = 'text/plain'
return response