Go to file
openharmony_ci e31aef6a9b
!19 update jinja to 3.1.3
Merge pull request !19 from 严学舟/master
2024-05-30 12:31:32 +00:00
.github issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
__init__.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
_compat.py update OpenHarmony 2.0 Canary 2021-06-02 02:29:43 +08:00
_identifier.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
.editorconfig add EditorConfig 2020-05-23 13:23:49 -07:00
.flake8 issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
.gitattributes update OpenHarmony 2.0 Canary 2021-06-02 02:29:43 +08:00
.gitignore update OpenHarmony 2.0 Canary 2021-06-02 02:29:43 +08:00
.pre-commit-config.yaml issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
.readthedocs.yaml pin os and python version in rtd build 2021-12-26 16:10:04 -07:00
async_utils.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
asyncfilters.py updated jinja2 version 2022-04-13 17:22:16 +08:00
asyncsupport.py update OpenHarmony 2.0 Canary 2021-06-02 02:29:43 +08:00
bccache.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
bundle.json update bundle.json. 2023-12-14 03:35:23 +00:00
CHANGES.rst issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2019-05-06 13:10:17 -04:00
compiler.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
constants.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
CONTRIBUTING.rst Improve the contributing guide 2021-05-25 08:51:55 +08:00
debug.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
defaults.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
environment.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
exceptions.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
ext.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
filters.py Decription: 【Bugfix】 【master】 CVE-2024-22195 modify. 2024-03-06 14:54:11 +08:00
idtracking.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
jinja2.gni update OpenHarmony 2.0 Canary 2021-06-02 02:29:43 +08:00
lexer.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
LICENSE.rst update OpenHarmony 2.0 Canary 2021-06-02 02:29:43 +08:00
loaders.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
MANIFEST.in fix py.typed in manifest 2021-05-10 06:53:52 -07:00
meta.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
nativetypes.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
nodes.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
NOTICE update OpenHarmony 2.0 Canary 2021-06-02 02:29:43 +08:00
OAT.xml jinja_1 2022-03-21 16:02:54 +08:00
optimizer.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
parser.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
py.typed 删减jinja 2023-06-13 16:37:01 +08:00
README.modification update OpenHarmony 2.0 Canary 2021-06-02 02:29:43 +08:00
README.OpenSource issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
README.rst issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
runtime.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
sandbox.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
setup.cfg issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
setup.py update markupsafe minimum version 2021-05-11 14:21:06 -07:00
tests.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00
tox.ini issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
utils.py issue:#I9SPO8 update jinja to 3.1.3 2024-05-28 10:37:23 +08:00
visitor.py update jinja to 3.1.2 2023-06-13 16:41:17 +08:00

Jinja
=====

Jinja is a fast, expressive, extensible templating engine. Special
placeholders in the template allow writing code similar to Python
syntax. Then the template is passed data to render the final document.

It includes:

-   Template inheritance and inclusion.
-   Define and import macros within templates.
-   HTML templates can use autoescaping to prevent XSS from untrusted
    user input.
-   A sandboxed environment can safely render untrusted templates.
-   AsyncIO support for generating templates and calling async
    functions.
-   I18N support with Babel.
-   Templates are compiled to optimized Python code just-in-time and
    cached, or can be compiled ahead-of-time.
-   Exceptions point to the correct line in templates to make debugging
    easier.
-   Extensible filters, tests, functions, and even syntax.

Jinja's philosophy is that while application logic belongs in Python if
possible, it shouldn't make the template designer's job difficult by
restricting functionality too much.


Installing
----------

Install and update using `pip`_:

.. code-block:: text

    $ pip install -U Jinja2

.. _pip: https://pip.pypa.io/en/stable/getting-started/


In A Nutshell
-------------

.. code-block:: jinja

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


Donate
------

The Pallets organization develops and supports Jinja and other popular
packages. In order to grow the community of contributors and users, and
allow the maintainers to devote more time to the projects, `please
donate today`_.

.. _please donate today: https://palletsprojects.com/donate


Links
-----

-   Documentation: https://jinja.palletsprojects.com/
-   Changes: https://jinja.palletsprojects.com/changes/
-   PyPI Releases: https://pypi.org/project/Jinja2/
-   Source Code: https://github.com/pallets/jinja/
-   Issue Tracker: https://github.com/pallets/jinja/issues/
-   Chat: https://discord.gg/pallets