• Home
  • Raw
  • Download

Lines Matching +full:test +full:- +full:shared +full:- +full:rel

14 ------
21 albeit a shared one.
31 .. code-block:: python
53 .. code-block:: python
59 .. code-block:: python
75 --------------
77 The high-level API is the API you will use in the application to load and
78 render Jinja templates. The :ref:`low-level-api` on the other side is only
80 <jinja-extensions>`.
87 .. attribute:: shared
91 created as shared environments which means that multiple templates
92 may have the same anonymous environment. For all shared environments
105 see :ref:`writing-filters`. For valid filter names have a look at
106 :ref:`identifier-naming`.
110 A dict of test functions for this environment. As long as no
112 see :ref:`writing-tests`. For valid test names have a look at
113 :ref:`identifier-naming`.
119 to modify this dict. For more details see :ref:`global-namespace`.
120 For valid object names have a look at :ref:`identifier-naming`.
184 this dict as it may be shared with other templates or the environment
213 ------------
218 autoescape extension is removed and built-in. However autoescaping is
222 on a per-template basis (HTML versus text for instance).
249 the `autoescape` block (see :ref:`autoescape-overrides`).
252 .. _identifier-naming:
255 --------------------
264 expression for filter and test identifiers is
265 ``[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)*```.
269 ---------------
331 .. code-block:: python
353 -----------
397 The current :ref:`eval-context`.
417 -------
446 .. _bytecode-cache:
449 --------------
489 -------------
504 - Template rendering requires an event loop to be available to the
507 - The compiled code uses ``await`` for functions and attributes, and
512 - Sync methods and filters become wrappers around their corresponding
527 --------
536 env.policies['urlize.rel'] = 'nofollow noopener'
544 ``urlize.rel``:
545 A string that defines the items for the `rel` attribute of generated
565 .. _ext-i18n-trimmed:
569 :ref:`i18n-extension` will always unify linebreaks and surrounding
574 ---------
594 to HTML-safe sequences. Use this if you need to display text that might
615 ----------
642 file system (most likely utf-8, or mbcs on Windows systems).
649 .. _writing-filters:
652 --------------
662 def datetimeformat(value, format='%H:%M / %d-%m-%Y'):
675 publication date: {{ article.pub_date|datetimeformat('%d-%m-%Y') }}
706 .. _eval-context:
709 ------------------
768 .. _writing-tests:
771 ------------
773 Tests work like filters just that there is no way for a test to get access
775 value of a test should be `True` or `False`. The purpose of a test is to
779 Here a simple test that checks if a variable is a prime number::
797 A template designer can then use the test like this:
808 .. _global-namespace:
811 --------------------
821 .. _low-level-api:
824 -------------
828 <jinja-extensions>` techniques. Unless you know exactly what you are doing we
864 The low-level API is fragile. Future Jinja versions will try not to
870 ------------