diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-01-01 12:34:23 -0800 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-01-01 12:34:23 -0800 |
commit | 8b92c96fa9ac599359cc3a1997928af8c71d3172 (patch) | |
tree | 8122daa0cc18cfd941da5ee4a47e7c91933e26e6 /README.rst | |
parent | d595856b5fb4ed7132ad8819b9b541f26872d92b (diff) | |
download | pystache-8b92c96fa9ac599359cc3a1997928af8c71d3172.tar.gz |
README formatting tweaks.
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -41,16 +41,18 @@ Use It You can also create dedicated view classes to hold your view logic. -Here's your view class (in `examples/readme.py`):: +Here's your view class (in ``examples/readme.py``):: class SayHello(object): def to(self): - return "World" + return "Pizza" + +Like so:: >>> from examples.readme import SayHello >>> hello = SayHello() -Then your template, `say_hello.mustache`:: +Then your template, ``say_hello.mustache``:: Hello, {{to}}! @@ -58,7 +60,7 @@ Pull it together:: >>> renderer = pystache.Renderer() >>> renderer.render(hello) - u'Hello, World!' + u'Hello, Pizza!' Test It @@ -76,7 +78,7 @@ To include tests from the mustache spec_ in your test runs: :: git submodule update nosetests -i spec -To run all available tests: +To run all available tests:: nosetests --with-doctest --doctest-extension=rst -i spec |