Commit 0995ca0d by Chris Jerdonek

Rewrote the Simple() example in README.rst without using pystache.View.

parent 9a57d05b
...@@ -43,9 +43,7 @@ You can also create dedicated view classes to hold your view logic. ...@@ -43,9 +43,7 @@ You can also create dedicated view classes to hold your view logic.
Here's your simple.py:: Here's your simple.py::
>>> import pystache >>> class Simple(object):
>>> class Simple(pystache.View):
... template_path = 'examples'
... def thing(self): ... def thing(self):
... return "pizza" ... return "pizza"
...@@ -55,7 +53,8 @@ Then your template, simple.mustache:: ...@@ -55,7 +53,8 @@ Then your template, simple.mustache::
Pull it together:: Pull it together::
>>> Simple().render() >>> renderer = pystache.Renderer(search_dirs='examples')
>>> renderer.render(Simple())
u'Hi pizza!' u'Hi pizza!'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment