diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-04-25 17:04:02 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-04-25 17:04:02 +0000 |
| commit | 7c525f127cee96a749e15b6ba2dfbc5379825178 (patch) | |
| tree | 9b54b73c791484ddd13bb9613c0f8209f050323c /docs/narr/project.rst | |
| parent | eac892170c9d1e889f2462dc59fe1a9b2b33c239 (diff) | |
| download | pyramid-7c525f127cee96a749e15b6ba2dfbc5379825178.tar.gz pyramid-7c525f127cee96a749e15b6ba2dfbc5379825178.tar.bz2 pyramid-7c525f127cee96a749e15b6ba2dfbc5379825178.zip | |
- It is now possible to turn on Chameleon template "debugging mode"
for all Chameleon BFG templates by setting a BFG-related Paster
``.ini`` file setting named ``debug_templates``. The exceptions
raised by Chameleon templates when a rendering fails are sometimes
less than helpful. ``debug_templates`` allows you to configure your
application development environment so that exceptions generated by
Chameleon during template compilation and execution will contain
more helpful debugging information. This mode is on by default in
all new projects.
Diffstat (limited to 'docs/narr/project.rst')
| -rw-r--r-- | docs/narr/project.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/narr/project.rst b/docs/narr/project.rst index dfac238b5..97df8a28c 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -233,6 +233,8 @@ section within the ``.ini`` file. For example, if your application reload_templates = true debug_authorization = false debug_notfound = false + debug_templates = true + default_locale_name = en If so, you can use the following command to invoke a debug shell using the name ``main`` as a section name: @@ -279,6 +281,8 @@ following ``.ini`` file content: reload_templates = true debug_authorization = false debug_notfound = false + debug_templates = true + default_locale_name = en [pipeline:main] pipeline = egg:repoze.tm2#tm @@ -534,6 +538,17 @@ detected. See :ref:`reload_templates_section` for more information. production applications, as template rendering is slowed when it is turned on. +The ``debug_templates`` setting in the ``[app:main]`` section is a +:mod:`repoze.bfg` -specific setting which is passed into the +framework. If it exists, and its value is ``true``, :term:`Chameleon` +template exceptions will contained more detailed and helpful +information about the error than when this value is ``false``. See +:ref:`debug_templates_section` for more information. + +.. warning:: The ``debug_templates`` option should be turned off for + production applications, as template rendering is slowed when it is + turned on. + Various other settings may exist in this section having to do with debugging or influencing runtime behavior of a :mod:`repoze.bfg` application. See :ref:`environment_chapter` for more information |
