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.
Here's your simple.py::
>>> import pystache
>>> class Simple(pystache.View):
... template_path = 'examples'
>>> class Simple(object):
... def thing(self):
... return "pizza"
......@@ -55,7 +53,8 @@ Then your template, simple.mustache::
Pull it together::
>>> Simple().render()
>>> renderer = pystache.Renderer(search_dirs='examples')
>>> renderer.render(Simple())
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