summaryrefslogtreecommitdiff
path: root/docs/index.rst
blob: 65d5d3d4a1db378e83187994e467573e091c788c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.. rst-class:: hide-header

Jinja
=====

.. image:: _static/jinja-logo.png
    :align: center
    :target: https://palletsprojects.com/p/jinja/

Jinja is a modern and designer-friendly templating language for Python,
modelled after Django's templates.  It is fast, widely used and secure
with the optional sandboxed template execution environment:

.. sourcecode:: html+jinja

   <title>{% block title %}{% endblock %}</title>
   <ul>
   {% for user in users %}
     <li><a href="{{ user.url }}">{{ user.username }}</a></li>
   {% endfor %}
   </ul>

Features:

-   sandboxed execution
-   powerful automatic HTML escaping system for XSS prevention
-   template inheritance
-   compiles down to the optimal python code just in time
-   optional ahead-of-time template compilation
-   easy to debug.  Line numbers of exceptions directly point to
    the correct line in the template.
-   configurable syntax

.. toctree::
    :maxdepth: 2
    :caption: Contents:

    intro
    api
    sandbox
    nativetypes
    templates
    extensions
    integration
    switching
    tricks
    faq
    changelog

* :ref:`genindex`
* :ref:`search`