Using Django template variables

You want to use a Django template variable to find out the number of times the current for loop has run.

Which of these can be used to achieve this?

Options
  1. forloop.last
  2. forloop.first
  3. forloop.counter
  4. forloop.counter0

Related Posts

Close Bitnami banner
Bitnami