summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-05-06 13:25:10 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-05-06 13:25:10 -0700
commit07dcd48752456ec1bb4ad87b17c877e71a19d503 (patch)
treebc771595a5e0849882b7d12e60196b0a0e640224
parentdc9cb18d816a8723f00585f7f3865332f067190d (diff)
downloadpystache-07dcd48752456ec1bb4ad87b17c877e71a19d503.tar.gz
Another README tweak.
-rw-r--r--README.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index 380b215..c8d8446 100644
--- a/README.rst
+++ b/README.rst
@@ -94,11 +94,14 @@ To customize template loading on a per-view basis, subclass ``TemplateSpec``.
See the docstrings of the Renderer_ class and TemplateSpec_ class for
more information.
-You can also parse a template: ::
+You can also pre-parse a template: ::
>>> parsed = pystache.parse(u"Hey {{#who}}{{.}}!{{/who}}")
>>> print parsed
[u'Hey ', _SectionNode(key=u'who', index_begin=12, index_end=18, parsed=[_EscapeNode(key=u'.'), u'!'])]
+
+And then::
+
>>> print renderer.render(parsed, {'who': 'Pops'})
Hey Pops!
>>> print renderer.render(parsed, {'who': 'you'})