<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>Jinja</name>
<shortdesc>A small but fast und easy to use stand-alone template engine written in pure python.</shortdesc>
<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::

    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
    &lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"&gt;
    &lt;head&gt;
        &lt;title&gt;My Webpage&lt;/title&gt;
    &lt;/head
    &lt;body&gt;
        &lt;ul id="navigation"&gt;
        {% for item in navigation %}
            &lt;li&gt;&lt;a href="{{ item.href }}"&gt;{{ item.caption|e }}&lt;/a&gt;&lt;/li&gt;
        {% endfor %}
        &lt;/ul&gt;

        &lt;h1&gt;My Webpage&lt;/h1&gt;
        {{ variable }}
    &lt;/body&gt;
    &lt;/html&gt;


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': '&lt;strong&gt;hello world&lt;/strong&gt;'
    })
    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/</description>
<homepage rdf:resource="http://wsgiarea.pocoo.org/jinja/" />
<maintainer><foaf:Person><foaf:name>Armin Ronacher</foaf:name>
<foaf:mbox_sha1sum>c7ba33ae7e575ec4e37640d5fb9b76fc2df7a623</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.8</revision></Version></release>
</Project></rdf:RDF>