summaryrefslogtreecommitdiff
path: root/docs/ref/templates/api.txt
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2025-07-25 10:24:17 +0100
committernessita <124304+nessita@users.noreply.github.com>2025-08-25 10:51:10 -0300
commitf81e6e3a53ee36e3f730a71aa55a5744982dd016 (patch)
tree44a4fdd64e2d1489d80b1af8bd1ac3c7af3ad0dd /docs/ref/templates/api.txt
parent4286a23df64f6ce3b9b6ed097f4d1aac7d9e0de4 (diff)
Refs #36485 -- Rewrapped docs to 79 columns line length.
Lines in the docs files were manually adjusted to conform to the 79 columns limit per line (plus newline), improving readability and consistency across the content.
Diffstat (limited to 'docs/ref/templates/api.txt')
-rw-r--r--docs/ref/templates/api.txt28
1 files changed, 15 insertions, 13 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index cc6d807ce1..bd04c87ef2 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -115,9 +115,10 @@ overridden by what's passed by
It defaults to ``'utf-8'``.
- * ``'libraries'``: A dictionary of labels and dotted Python paths of template
- tag modules to register with the template engine. This is used to add new
- libraries or provide alternate labels for existing ones. For example::
+ * ``'libraries'``: A dictionary of labels and dotted Python paths of
+ template tag modules to register with the template engine. This is used
+ to add new libraries or provide alternate labels for existing ones. For
+ example::
Engine(
libraries={
@@ -136,8 +137,8 @@ overridden by what's passed by
builtins=["myapp.builtins"],
)
- Tags and filters from built-in libraries can be used without first calling
- the :ttag:`{% load %}<load>` tag.
+ Tags and filters from built-in libraries can be used without first
+ calling the :ttag:`{% load %}<load>` tag.
.. staticmethod:: Engine.get_default()
@@ -434,11 +435,11 @@ Django's template language has no way to escape the characters used for its own
syntax. For example, the :ttag:`templatetag` tag is required if you need to
output character sequences like ``{%`` and ``%}``.
-A similar issue exists if you want to include these sequences in template filter
-or tag arguments. For example, when parsing a block tag, Django's template
-parser looks for the first occurrence of ``%}`` after a ``{%``. This prevents
-the use of ``"%}"`` as a string literal. For example, a ``TemplateSyntaxError``
-will be raised for the following expressions:
+A similar issue exists if you want to include these sequences in template
+filter or tag arguments. For example, when parsing a block tag, Django's
+template parser looks for the first occurrence of ``%}`` after a ``{%``. This
+prevents the use of ``"%}"`` as a string literal. For example, a
+``TemplateSyntaxError`` will be raised for the following expressions:
.. code-block:: html+django
@@ -588,8 +589,8 @@ tags <howto-writing-custom-template-tags>`.
.. method:: Context.flatten()
-Using ``flatten()`` method you can get whole ``Context`` stack as one dictionary
-including builtin variables.
+Using ``flatten()`` method you can get whole ``Context`` stack as one
+dictionary including builtin variables.
.. code-block:: pycon
@@ -600,7 +601,8 @@ including builtin variables.
>>> c.flatten()
{'True': True, 'None': None, 'foo': 'first level', 'False': False, 'bar': 'second level'}
-A ``flatten()`` method is also internally used to make ``Context`` objects comparable.
+A ``flatten()`` method is also internally used to make ``Context`` objects
+comparable.
.. code-block:: pycon