Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
8b92c96f
Commit
8b92c96f
authored
Jan 01, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
README formatting tweaks.
parent
d595856b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
README.rst
+7
-5
examples/readme.py
+1
-1
No files found.
README.rst
View file @
8b92c96f
...
...
@@ -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
...
...
examples/readme.py
View file @
8b92c96f
class
SayHello
(
object
):
def
to
(
self
):
return
"
World
"
return
"
Pizza
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment