blob: a08d6281df47eb6d6076d864f288efed4d59e132 [file] [log] [blame]
Armin Ronacherd6a20032010-10-17 16:30:15 +02001Welcome to Jinja2
2=================
Armin Ronacher083ae162008-04-27 21:42:57 +02003
Carl A Dunhamd5463582014-01-18 15:26:10 -06004Jinja2 is a modern and designer-friendly templating language for Python,
Armin Ronacherd6a20032010-10-17 16:30:15 +02005modelled after Django's templates. It is fast, widely used and secure
6with the optional sandboxed template execution environment:
7
8.. sourcecode:: html+jinja
9
10 <title>{% block title %}{% endblock %}</title>
11 <ul>
12 {% for user in users %}
13 <li><a href="{{ user.url }}">{{ user.username }}</a></li>
14 {% endfor %}
15 </ul>
16
17**Features:**
18
19- sandboxed execution
20- powerful automatic HTML escaping system for XSS prevention
21- template inheritance
22- compiles down to the optimal python code just in time
Carl A Dunhamd5463582014-01-18 15:26:10 -060023- optional ahead-of-time template compilation
Armin Ronacherd6a20032010-10-17 16:30:15 +020024- easy to debug. Line numbers of exceptions directly point to
25 the correct line in the template.
26- configurable syntax
27
Armin Ronacher89f61fd2011-02-06 12:19:30 +010028.. include:: contents.rst.inc
Armin Ronacher9d472df2008-05-04 19:56:34 +020029
Armin Ronachered98cac2008-05-07 08:42:11 +020030If you can't find the information you're looking for, have a look at the
jmoorecd954142011-12-14 17:09:29 +010031index or try to find it using the search function:
Armin Ronachered98cac2008-05-07 08:42:11 +020032
Armin Ronacher9d472df2008-05-04 19:56:34 +020033* :ref:`genindex`
Armin Ronachered98cac2008-05-07 08:42:11 +020034* :ref:`search`