summaryrefslogtreecommitdiff
path: root/docs/howto
diff options
context:
space:
mode:
authorNatalia <124304+nessita@users.noreply.github.com>2025-04-15 11:42:58 -0300
committernessita <124304+nessita@users.noreply.github.com>2025-04-15 14:48:55 -0300
commit5020a9d43a9ebd5f20f9a77e5fed424023facb15 (patch)
treec70b94d56a1974c037790a4b70bff9ff0e3b6e5e /docs/howto
parentbe402891cd78f484b7f67e486924975523516ced (diff)
Replaced '' with * for consistent emphasis styling in docs/howto/custom-template-tags.txt.
Diffstat (limited to 'docs/howto')
-rw-r--r--docs/howto/custom-template-tags.txt19
1 files changed, 9 insertions, 10 deletions
diff --git a/docs/howto/custom-template-tags.txt b/docs/howto/custom-template-tags.txt
index a7f413fca1..e56ef54f02 100644
--- a/docs/howto/custom-template-tags.txt
+++ b/docs/howto/custom-template-tags.txt
@@ -837,12 +837,12 @@ The template system works in a two-step process: compiling and rendering. To
define a custom template tag, you specify how the compilation works and how
the rendering works.
-When Django compiles a template, it splits the raw template text into
-''nodes''. Each node is an instance of ``django.template.Node`` and has
-a ``render()`` method. A compiled template is a list of ``Node`` objects. When
-you call ``render()`` on a compiled template object, the template calls
-``render()`` on each ``Node`` in its node list, with the given context. The
-results are all concatenated together to form the output of the template.
+When Django compiles a template, it splits the raw template text into *nodes*.
+Each node is an instance of ``django.template.Node`` and has a ``render()``
+method. A compiled template is a list of ``Node`` objects. When you call
+``render()`` on a compiled template object, the template calls ``render()`` on
+each ``Node`` in its node list, with the given context. The results are all
+concatenated together to form the output of the template.
Thus, to define a custom template tag, you specify how the raw template tag is
converted into a ``Node`` (the compilation function), and what the node's
@@ -906,8 +906,7 @@ Notes:
* The ``TemplateSyntaxError`` exceptions use the ``tag_name`` variable.
Don't hardcode the tag's name in your error messages, because that
couples the tag's name to your function. ``token.contents.split()[0]``
- will ''always'' be the name of your tag -- even when the tag has no
- arguments.
+ will *always* be the name of your tag -- even when the tag has no arguments.
* The function returns a ``CurrentTimeNode`` with everything the node needs
to know about this tag. In this case, it passes the argument --
@@ -1305,9 +1304,9 @@ Here's how a simplified ``{% comment %}`` tag might be implemented::
followed by ``parser.delete_first_token()``, thus avoiding the generation of a
node list.
-``parser.parse()`` takes a tuple of names of block tags ''to parse until''. It
+``parser.parse()`` takes a tuple of names of block tags *to parse until*. It
returns an instance of ``django.template.NodeList``, which is a list of
-all ``Node`` objects that the parser encountered ''before'' it encountered
+all ``Node`` objects that the parser encountered *before* it encountered
any of the tags named in the tuple.
In ``"nodelist = parser.parse(('endcomment',))"`` in the above example,