Run `./2to3.py -w jinja2`
[jinja2.git] / README.rst
1 Jinja2
2 ~~~~~~
3
4 Jinja2 is a template engine written in pure Python.  It provides a
5 `Django`_ inspired non-XML syntax but supports inline expressions and
6 an optional `sandboxed`_ environment.
7
8 Nutshell
9 --------
10
11 Here a small example of a Jinja template::
12
13     {% extends 'base.html' %}
14     {% block title %}Memberlist{% endblock %}
15     {% block content %}
16       <ul>
17       {% for user in users %}
18         <li><a href="{{ user.url }}">{{ user.username }}</a></li>
19       {% endfor %}
20       </ul>
21     {% endblock %}
22
23 Philosophy
24 ----------
25
26 Application logic is for the controller but don't try to make the life
27 for the template designer too hard by giving him too few functionality.
28
29 For more informations visit the new `Jinja2 webpage`_ and `documentation`_.
30
31 The `Jinja2 tip`_ is installable via `easy_install` with ``easy_install
32 Jinja2==dev``.
33
34 .. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)
35 .. _Django: http://www.djangoproject.com/
36 .. _Jinja2 webpage: http://jinja.pocoo.org/
37 .. _documentation: http://jinja.pocoo.org/2/documentation/
38 .. _Jinja2 tip: http://dev.pocoo.org/hg/jinja2-main/archive/tip.tar.gz#egg=Jinja2-dev