👋 Hey there, I am Waylon Walker
I am a Husband, Father of two beautiful children, Senior Python Developer currently working in the Data Engineering platform space. I am a continuous learner, and sha
Interesting, I have never seen a Django template before. If there are nested loops is there a way to distinguish between inner and outer for loops. This magical for loop variable seems a bit mysterious to me. I have never really reached for a template language and mostly stuck with the built-in string Template for my very limited use of templates.
Sorry for the late reply.
For two loops, it seems like there is the forloop.parentloop .
e.g. forloop.parentloop.counter
However for three or more loops I do not know yet whether there is a way to distinguish each of them.
Interesting, I have never seen a Django template before. If there are nested loops is there a way to distinguish between inner and outer for loops. This magical for loop variable seems a bit mysterious to me. I have never really reached for a template language and mostly stuck with the built-in string Template for my very limited use of templates.
Sorry for the late reply.
For two loops, it seems like there is the forloop.parentloop .
e.g. forloop.parentloop.counter
However for three or more loops I do not know yet whether there is a way to distinguish each of them.
This stackoverflow might be of a help: stackoverflow.com/questions/237651...