You can use forloop.parentloop
to get to the outer forloop
, so in your case {{forloop.parentloop.counter}}
.
More Related Contents:
- Numeric for loop in Django templates
- Can I access constants in settings.py from templates in Django?
- How to concatenate strings in django templates?
- django 1.5 – How to use variables inside static tag
- How can I change the default Django date template format?
- Applying bootstrap styles to django forms
- Load a Django template tag library for all views by default
- Use variable as dictionary key in Django template
- Variable subtraction in django templates
- How to set a value of a variable inside a template code?
- Django – iterate number in for loop of a template
- Django: How do I add arbitrary html attributes to input fields on a form?
- How do I add multiple arguments to my custom template filter in a django template?
- Get list item dynamically in django templates
- Django Template – Increment the value of a variable
- Add class to form field Django ModelForm
- Access kwargs from a URL in a Django template
- Django templates: value of dictionary key with a space in it
- Django – Simple custom template tag example
- Grouped CheckboxSelectMultiple in Django template
- Django templates: verbose version of a choice
- How to get URL of current page, including parameters, in a template?
- {% include %} vs {% extends %} in django templates
- Django {{ MEDIA_URL }} blank @DEPRECATED
- How to use if/else condition on Django Templates?
- How to iterate over nested dictionaries in django templates
- Django templates folders
- Get type of Django form widget from within template
- How do you limit list objects template side, rather than view side
- Django template {%for%} tag add li every 4th element