summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-05-31 15:32:13 +0000
committerChris McDonough <chrism@agendaless.com>2009-05-31 15:32:13 +0000
commita099e0f69902b0db37b4b57c36a1931b6626293e (patch)
tree9645ac310c2b937cc528d38562b45d46ce01b268 /docs
parent1ef82ed3b00d6f6c335fbc857dfd6b0ead50e4f8 (diff)
downloadpyramid-a099e0f69902b0db37b4b57c36a1931b6626293e.tar.gz
pyramid-a099e0f69902b0db37b4b57c36a1931b6626293e.tar.bz2
pyramid-a099e0f69902b0db37b4b57c36a1931b6626293e.zip
Side effects.
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/templates.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst
index 7c8d8bfba..97d29d689 100644
--- a/docs/narr/templates.rst
+++ b/docs/narr/templates.rst
@@ -180,6 +180,29 @@ And ``templates/mytemplate.pt`` might look like so:
</span>
</html>
+Side Effects of Rendering a Chameleon Template
+----------------------------------------------
+
+When a Chameleon template is rendered from a file, the templating
+engine writes a file in the same directory as the template file itself
+as a kind of cache, in order to do less work the next time the
+template needs to be read from disk. When using ``chameleon.core``
+version 1.0b32 and lower, this filename is ``<template_name>.cache``.
+When using ``chameleon.core`` version 1.0b33 and higher, this filename
+is ``<template_name>.py``. If you see "strange" ``.py`` or ``.cache``
+files showing up in your ``templates`` directory, it is due to this
+feature. If you're using a version control system such as Subversion,
+you should cause it to ignore these files. Here's the contents of my
+``svn propedit svn:ignore .`` in each of my ``templates`` directories.
+(Note that I always name my Chameleon ZPT template files with a
+``.pt`` extension, so that this pattern works):
+
+.. code-block:: bash
+ :linenos:
+
+ *.cache
+ *.pt.py
+
.. _reload_templates_section:
Automatically Reloading Templates