Mercurial > genshi > genshi-test
comparison doc/templates.txt @ 884:5a1c0ee0f659
Improve the template loader docs.
author | cmlenz |
---|---|
date | Fri, 16 Apr 2010 20:40:28 +0000 |
parents | b8ac236f0254 |
children |
comparison
equal
deleted
inserted
replaced
883:0849dcc8ed46 | 884:5a1c0ee0f659 |
---|---|
140 | 140 |
141 .. _serialization: streams.html#serialization | 141 .. _serialization: streams.html#serialization |
142 .. _`Text Template Language`: text-templates.html | 142 .. _`Text Template Language`: text-templates.html |
143 .. _`Markup Streams`: streams.html | 143 .. _`Markup Streams`: streams.html |
144 | 144 |
145 Using a template loader provides the advantage that “compiled” templates are | 145 Using a `template loader`_ provides the advantage that “compiled” templates are |
146 automatically cached, and only parsed again when the template file changes. In | 146 automatically cached, and only parsed again when the template file changes. In |
147 addition, it enables the use of a *template search path*, allowing template | 147 addition, it enables the use of a *template search path*, allowing template |
148 directories to be spread across different file-system locations. Using a | 148 directories to be spread across different file-system locations. Using a |
149 template loader would generally look as follows: | 149 template loader would generally look as follows: |
150 | 150 |
157 print(stream.render()) | 157 print(stream.render()) |
158 | 158 |
159 See the `API documentation <api/index.html>`_ for details on using Genshi via | 159 See the `API documentation <api/index.html>`_ for details on using Genshi via |
160 the Python API. | 160 the Python API. |
161 | 161 |
162 .. _`template loader`: loader.html | |
162 | 163 |
163 .. _`expressions`: | 164 .. _`expressions`: |
164 | 165 |
165 ------------------------------------ | 166 ------------------------------------ |
166 Template Expressions and Code Blocks | 167 Template Expressions and Code Blocks |