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
aa1a256d
Commit
aa1a256d
authored
Jan 01, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spacing; added a link to the spec; and made the author line a doctest.
parent
ee3d4a65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
README.rst
+12
-7
No files found.
README.rst
View file @
aa1a256d
...
@@ -20,7 +20,9 @@ Logo: David Phillips - http://davidphillips.us/
...
@@ -20,7 +20,9 @@ Logo: David Phillips - http://davidphillips.us/
Documentation
Documentation
=============
=============
The different Mustache tags are documented at `mustache(5)`_.
The `mustache(5)`_ man page is the main entry point for understanding
Mustache syntax. Beyond this, the Mustache spec_ provides more complete
(and more current) documentation of Mustache's behavior.
Install It
Install It
==========
==========
...
@@ -41,9 +43,10 @@ Use It
...
@@ -41,9 +43,10 @@ Use It
You can also create dedicated view classes to hold your view logic.
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):
class SayHello(object):
def to(self):
def to(self):
return "Pizza"
return "Pizza"
...
@@ -52,7 +55,7 @@ Like so::
...
@@ -52,7 +55,7 @@ Like so::
>>> from examples.readme import SayHello
>>> from examples.readme import SayHello
>>> hello = SayHello()
>>> hello = SayHello()
Then your template,
``say_hello.mustache``
::
Then your template,
say_hello.mustache
::
Hello, {{to}}!
Hello, {{to}}!
...
@@ -72,7 +75,7 @@ nose_ works great! ::
...
@@ -72,7 +75,7 @@ nose_ works great! ::
cd pystache
cd pystache
nosetests
nosetests
To include tests from the
m
ustache spec_ in your test runs: ::
To include tests from the
M
ustache spec_ in your test runs: ::
git submodule init
git submodule init
git submodule update
git submodule update
...
@@ -84,7 +87,8 @@ To run all available tests (including doctests)::
...
@@ -84,7 +87,8 @@ To run all available tests (including doctests)::
Mailing List
Mailing List
==================
==================
As of Nov 26, 2011, there's a mailing list, pystache@librelist.com.
As of November 2011, there's a mailing list, pystache@librelist.com.
Archive: http://librelist.com/browser/pystache/
Archive: http://librelist.com/browser/pystache/
...
@@ -96,8 +100,9 @@ Author
...
@@ -96,8 +100,9 @@ Author
::
::
context = { 'author': 'Chris Wanstrath', 'email': 'chris@ozmm.org' }
>>> context = { 'author': 'Chris Wanstrath', 'email': 'chris@ozmm.org' }
pystache.render("{{author}} :: {{email}}", context)
>>> pystache.render("{{author}} :: {{email}}", context)
u'Chris Wanstrath :: chris@ozmm.org'
.. _ctemplate: http://code.google.com/p/google-ctemplate/
.. _ctemplate: http://code.google.com/p/google-ctemplate/
...
...
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