Metadata-Version: 1.0 Name: Jinja Version: 0.9 Summary: A small but fast und easy to use stand-alone template engine written in pure python. Home-page: http://wsgiarea.pocoo.org/jinja/ Author: Armin Ronacher Author-email: armin.ronacher@active-4.com License: BSD Description: Jinja is a small but very fast und easy to use stand-alone template engine written in pure python. Since version 0.6 it uses a new parser that increases parsing performance a lot by caching the nodelists on the harddisk if wanted. It includes multiple template inheritance and other features like simple value escaping... Template Syntax =============== This is a small example template in which you can see, how jinja's syntax looks like:: My Webpage

My Webpage

{{ variable }} Usage ===== Here a small example:: from jinja import Template, Context, FileSystemLoader t = Template('mytemplate', FileSystemLoader('/path/to/the/templates')) c = Context({ 'navigation' [ {'href': '#', 'caption': 'Index'}, {'href': '#', 'caption': 'Spam'} ], 'variable': 'hello world' }) print t.render(c) Unicode Support =============== Jinja comes with built-in Unicode support. As a matter of fact, the return value of ``Template.render()`` will be a Python unicode object. You can still output ``str`` objects as well when you encode the result:: s = t.render(c).encode('utf-8') For more examples check out the `documentation`_ on the `jinja webpage`_. .. _documentation: http://wsgiarea.pocoo.org/jinja/docs/ .. _jinja webpage: http://wsgiarea.pocoo.org/jinja/ Keywords: wsgi web templateengine templates Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content