mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #36186 -- Added forloop.length variable within a template for loop.
This commit is contained in:
parent
582ba18d56
commit
240421c7c4
4 changed files with 30 additions and 2 deletions
|
@ -423,10 +423,15 @@ Variable Description
|
|||
loop (0-indexed)
|
||||
``forloop.first`` True if this is the first time through the loop
|
||||
``forloop.last`` True if this is the last time through the loop
|
||||
``forloop.length`` The length of the loop
|
||||
``forloop.parentloop`` For nested loops, this is the loop surrounding
|
||||
the current one
|
||||
========================== ===============================================
|
||||
|
||||
.. versionchanged:: 6.0
|
||||
|
||||
The variable ``forloop.length`` was added.
|
||||
|
||||
``for`` ... ``empty``
|
||||
---------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue