Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 50 lines (38 sloc) 1.861 kb
f55b1a4 @mitsuhiko Added README
authored
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
84f39ff @untitaker Amend to #453
untitaker authored
26 Application logic is for the controller, but don't make the template designer's
27 life difficult by restricting functionality too much.
f55b1a4 @mitsuhiko Added README
authored
28
cdad3e6 @jeffwidman Fix typos and grammar in Readme
jeffwidman authored
29 For more information visit the new `Jinja2 webpage`_ and `documentation`_.
f55b1a4 @mitsuhiko Added README
authored
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/
1a87fc1 @apetresc Fixing dead link to documentation in README.rst
apetresc authored
37 .. _documentation: http://jinja.pocoo.org/docs/
dd0f398 @br0p0p Update Jinja2 tip link
br0p0p authored
38 .. _Jinja2 tip: http://jinja.pocoo.org/docs/intro/#as-a-python-egg-via-easy-install
0349f9b @untitaker Add build badges
untitaker authored
39
40 Builds
41 ------
42
43 +---------------------+------------------------------------------------------------------------------+
44 | ``master`` | .. image:: https://travis-ci.org/mitsuhiko/jinja2.svg?branch=master |
45 | | :target: https://travis-ci.org/mitsuhiko/jinja2 |
46 +---------------------+------------------------------------------------------------------------------+
47 | ``2.7-maintenance`` | .. image:: https://travis-ci.org/mitsuhiko/jinja2.svg?branch=2.7-maintenance |
48 | | :target: https://travis-ci.org/mitsuhiko/jinja2 |
49 +---------------------+------------------------------------------------------------------------------+
Something went wrong with that request. Please try again.