From c4bff4efee83a50f051a5f49015b21989c0d0fd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20DIDIER?= <73602526+sdidier-dev@users.noreply.github.com> Date: Fri, 22 Jul 2022 17:47:56 +0200 Subject: [PATCH] Add in docs/switching/#loops little improvement for consistency --- docs/switching.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/switching.rst b/docs/switching.rst index caa35c36..a0ee530e 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 %} -- 2.47.2