summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien DIDIER <73602526+sdidier-dev@users.noreply.github.com>2022-07-22 17:47:56 +0200
committerSébastien DIDIER <73602526+sdidier-dev@users.noreply.github.com>2022-07-22 17:47:56 +0200
commitc4bff4efee83a50f051a5f49015b21989c0d0fd4 (patch)
treee14f29310c6ce27a366e1ee4461c4b97ec153c6a
parent4bfc33a2762f007d3fb7e541aadd991ab997df62 (diff)
downloadjinja2-c4bff4efee83a50f051a5f49015b21989c0d0fd4.tar.gz
Add in docs/switching/#loops little improvement for consistency
-rw-r--r--docs/switching.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/switching.rst b/docs/switching.rst
index caa35c3..a0ee530 100644
--- a/docs/switching.rst
+++ b/docs/switching.rst
@@ -84,7 +84,7 @@ In Django, the special variable for the loop context is called
.. code-block:: django
{% for item in items %}
- {{ item }}
+ {{ forloop.counter }}. {{ item }}
{% empty %}
No items!
{% endfor %}
@@ -95,7 +95,7 @@ and the ``else`` block is used for no loop items.
.. code-block:: jinja
{% for item in items %}
- {{ loop.index}}. {{ item }}
+ {{ loop.index }}. {{ item }}
{% else %}
No items!
{% endfor %}