Skip to content
Myr

intro.rst

This file

Path

docs/intro.rst

63 lines · 1.9 KiB

Last changed by

drop end of life python versions (#2096)David Lordbefore adoption49c48a0

History of this file

Take it

The walk stopped after 200 commits: lines older than c580dd0 point at it.

update building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0

lines 1–14why, one step back
1Introduction
2============34Jinja is a fast, expressive, extensible templating engine. Special5placeholders in the template allow writing code similar to Python6syntax. Then the template is passed data to render the final document.78It includes:910- Template inheritance and inclusion.11- Define and import macros within templates.12- HTML templates can use autoescaping to prevent XSS from untrusted13 user input.14- A sandboxed environment can safely render untrusted templates.

Merge pull request #1392 from pallets/inline-asyncDavid Lordbefore adoption9d4689b

lines 15–16why, one step back
15- Async support for generating templates that automatically handle
16 sync and async functions without extra syntax.

update building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0

lines 17–32why, one step back
17- I18N support with Babel.
18- Templates are compiled to optimized Python code just-in-time and19 cached, or can be compiled ahead-of-time.20- Exceptions point to the correct line in templates to make debugging21 easier.22- Extensible filters, tests, functions, and even syntax.2324Jinja's philosophy is that while application logic belongs in Python if25possible, it shouldn't make the template designer's job difficult by26restricting functionality too much.272829Installation30------------3132We recommend using the latest version of Python. Jinja supports Python

drop end of life python versions (#2096)David Lordbefore adoption49c48a0

line 33why, one step back
333.10 and newer. We also recommend using a `virtual environment`_ in order

update building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0

lines 34–62why, one step back
34to isolate your project dependencies from other projects and the system.
3536.. _virtual environment: https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments3738Install the most recent Jinja version using pip:3940.. code-block:: text4142 $ pip install Jinja2434445Dependencies46~~~~~~~~~~~~4748These will be installed automatically when installing Jinja.4950- `MarkupSafe`_ escapes untrusted input when rendering templates to51 avoid injection attacks.5253.. _MarkupSafe: https://markupsafe.palletsprojects.com/545556Optional Dependencies57~~~~~~~~~~~~~~~~~~~~~5859These distributions will not be installed automatically.6061- `Babel`_ provides translation support in templates.62

Merge branch '3.0.x'David Lordbefore adoptione20a52e

line 63why, one step back
63.. _Babel: https://babel.pocoo.org/