summaryrefslogtreecommitdiff
path: root/docs/narr/templates.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/narr/templates.rst')
-rw-r--r--docs/narr/templates.rst30
1 files changed, 21 insertions, 9 deletions
diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst
index 150b173e3..0f46f6422 100644
--- a/docs/narr/templates.rst
+++ b/docs/narr/templates.rst
@@ -241,6 +241,9 @@ of :func:`~pyramid.renderers.render` (a string):
single: renderer (template)
+.. index::
+ pair: renderer; system values
+
.. _renderer_system_values:
System Values Used During Rendering
@@ -277,6 +280,9 @@ renderer itself, but most template renderers, including Chameleon and
Mako renderers, make these names available as top-level template
variables.
+.. index::
+ pair: renderer; templates
+
.. _templates_used_as_renderers:
Templates Used as Renderers via Configuration
@@ -426,7 +432,7 @@ See also :ref:`built_in_renderers` for more general information about
renderers, including Chameleon ZPT renderers.
.. index::
- single: sample template
+ single: ZPT template (sample)
A Sample ZPT Template
~~~~~~~~~~~~~~~~~~~~~
@@ -448,7 +454,7 @@ Here's what a simple :term:`Chameleon` ZPT template used under
<body>
<h1 class="title">Welcome to <code>${project}</code>, an
application generated by the <a
- href="http://docs.pylonsproject.org/projects/pyramid/dev/"
+ href="http://docs.pylonsproject.org/projects/pyramid/current/"
>pyramid</a> web
application framework.</h1>
</body>
@@ -596,6 +602,9 @@ Note that I always name my Chameleon ZPT template files with a ``.pt``
extension and my Chameleon text template files with a ``.txt``
extension so that these ``svn:ignore`` patterns work.
+.. index::
+ pair: debugging; templates
+
.. _debug_templates_section:
Nicer Exceptions in Chameleon Templates
@@ -623,15 +632,15 @@ variable set to ``1``, For example:
$ PYRAMID_DEBUG_TEMPLATES=1 bin/paster serve myproject.ini
To use a setting in the application ``.ini`` file for the same
-purpose, set the ``debug_templates`` key to ``true`` within the
-application's configuration section, e.g.:
+purpose, set the ``pyramid.debug_templates`` key to ``true`` within
+the application's configuration section, e.g.:
.. code-block:: ini
:linenos:
[app:MyProject]
use = egg:MyProject#app
- debug_templates = true
+ pyramid.debug_templates = true
With template debugging off, a :exc:`NameError` exception resulting
from rendering a template with an undefined variable
@@ -668,7 +677,7 @@ displaying the arguments passed to the template itself.
.. note::
- Turning on ``debug_templates`` has the same effect as using the
+ Turning on ``pyramid.debug_templates`` has the same effect as using the
Chameleon environment variable ``CHAMELEON_DEBUG``. See `Chameleon
Environment Variables
<http://chameleon.repoze.org/docs/latest/config.html#environment-variables>`_
@@ -724,6 +733,9 @@ in the ``templates`` subdirectory of the ``mypackage`` Python package. See
``mako.directories`` setting and other Mako-related settings that can be
placed into the application's ``ini`` file.
+.. index::
+ single: Mako template (sample)
+
A Sample Mako Template
~~~~~~~~~~~~~~~~~~~~~~
@@ -740,7 +752,7 @@ look like:
<body>
<h1 class="title">Welcome to <code>${project}</code>, an
application generated by the <a
- href="http://docs.pylonsproject.org/projects/pyramid/dev/"
+ href="http://docs.pylonsproject.org/projects/pyramid/current/"
>pyramid</a> web application framework.</h1>
</body>
</html>
@@ -781,7 +793,7 @@ variable set to ``1``, For example:
$ PYRAMID_RELOAD_TEMPLATES=1 bin/paster serve myproject.ini
To use a setting in the application ``.ini`` file for the same
-purpose, set the ``reload_templates`` key to ``true`` within the
+purpose, set the ``pyramid.reload_templates`` key to ``true`` within the
application's configuration section, e.g.:
.. code-block:: ini
@@ -789,7 +801,7 @@ application's configuration section, e.g.:
[app:main]
use = egg:MyProject#app
- reload_templates = true
+ pyramid.reload_templates = true
.. index::
single: template system bindings