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
a5de2eb2
Commit
a5de2eb2
authored
Jan 01, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'readme-tweaks' into development: added link to spec, etc.
parents
ee3d4a65
de5451d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
README.rst
+14
-9
No files found.
README.rst
View file @
a5de2eb2
...
...
@@ -4,8 +4,8 @@ Pystache
.. image:: https://s3.amazonaws.com/webdev_bucket/pystache.png
Inspired by ctemplate_ and et_, Mustache_ is a
framework-agnostic way to render logic-free views
.
Mustache_ is a framework-agnostic way to render logic-free views that is
inspired by ctemplate_ and et_
.
As ctemplates says, "It emphasizes separating logic from presentation:
it is impossible to embed application logic in this template language."
...
...
@@ -20,7 +20,9 @@ Logo: David Phillips - http://davidphillips.us/
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
==========
...
...
@@ -41,9 +43,10 @@ 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 "Pizza"
...
...
@@ -52,7 +55,7 @@ Like so::
>>> from examples.readme import SayHello
>>> hello = SayHello()
Then your template,
``say_hello.mustache``
::
Then your template,
say_hello.mustache
::
Hello, {{to}}!
...
...
@@ -72,7 +75,7 @@ nose_ works great! ::
cd pystache
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 update
...
...
@@ -84,7 +87,8 @@ To run all available tests (including doctests)::
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/
...
...
@@ -96,8 +100,9 @@ Author
::
context = { 'author': 'Chris Wanstrath', 'email': 'chris@ozmm.org' }
pystache.render("{{author}} :: {{email}}", context)
>>> context = { 'author': 'Chris Wanstrath', 'email': 'chris@ozmm.org' }
>>> pystache.render("{{author}} :: {{email}}", context)
u'Chris Wanstrath :: chris@ozmm.org'
.. _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