Commit 04560aca by Damien Lebrun Committed by Chris Wanstrath

Convert HISTORY and README to reStructuredText

and use them setup's long_description argument.
parent feec8f0a
## 0.2.0 (2010-02-15)
History
=======
0.2.0 (2010-02-15)
------------------
* Bugfix: Methods returning False or None are not rendered
* Bugfix: Don't render an empty string when a tag's value is 0. [enaeseth]
......@@ -7,11 +12,13 @@
* Support for Unicode and non-ASCII-encoded bytestring output. [enaeseth]
* Template file encoding awareness. [enaeseth]
## 0.1.1 (2009-11-13)
0.1.1 (2009-11-13)
------------------
* Ensure we're dealing with strings, always
* Tests can be run by executing the test file directly
## 0.1.0 (2009-11-12)
0.1.0 (2009-11-12)
------------------
* First release
========
Pystache
========
Inspired by [ctemplate][1] and [et][2], Mustache is a
Inspired by ctemplate_ and et_, Mustache_ is a
framework-agnostic way to render logic-free views.
As ctemplates says, "It emphasizes separating logic from presentation:
......@@ -12,13 +13,15 @@ with Python 2.6.1.
Documentation
-------------
=============
The different Mustache tags are documented at [mustache(5)][m5].
The different Mustache tags are documented at `mustache(5)`_.
Use It
------
======
::
>>> import pystache
>>> pystache.render('Hi {{person}}!', {'person': 'Mom'})
......@@ -26,24 +29,27 @@ Use It
You can also create dedicated view classes to hold your view logic.
Here's your simple.py:
Here's your simple.py::
import pystache
class Simple(pystache.View):
def thing(self):
return "pizza"
Then your template, simple.mustache:
Then your template, simple.mustache::
Hi {{thing}}!
Pull it together:
Pull it together::
>>> Simple().render()
'Hi pizza!'
Test It
-------
=======
[nose][n] works great!
nose_ works great! ::
easy_install nose
cd pystache
......@@ -51,15 +57,16 @@ Test It
Author
------
======
::
context = { 'author': 'Chris Wanstrath', 'email': 'chris@ozmm.org' }
pystache.render("{{author}} :: {{email}}", context)
[1]: http://code.google.com/p/google-ctemplate/
[2]: http://www.ivan.fomichev.name/2008/05/erlang-template-engine-prototype.html
[3]: http://google-ctemplate.googlecode.com/svn/trunk/doc/howto.html
[4]: http://github.com/defunkt/mustache#readme
[n]: http://somethingaboutorange.com/mrl/projects/nose/0.11.1/testing.html
[m5]: http://defunkt.github.com/mustache/mustache.5.html
\ No newline at end of file
.. _ctemplate: http://code.google.com/p/google-ctemplate/
.. _et: http://www.ivan.fomichev.name/2008/05/erlang-template-engine-prototype.html
.. _Mustache: http://defunkt.github.com/mustache/
.. _mustache(5): http://defunkt.github.com/mustache/mustache.5.html
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/0.11.1/testing.html
\ No newline at end of file
......@@ -16,6 +16,7 @@ if sys.argv[-1] == "publish":
setup(name='pystache',
version='0.2.0',
description='Mustache for Python',
long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(),
author='Chris Wanstrath',
author_email='chris@ozmm.org',
url='http://github.com/defunkt/pystache',
......
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