I currently have this variable in my template:
{{ product_list.0.image_set.all.0.image.url }}
It successfully gives the url for the first image in the first product in the product list.
I want something like this:
{{ product_list.forloop.counter.image_set.all.0.image.url }}
So that I can get the first image of every image in the product_list in a for loop. But the above code does not work. Is this possible?
product_listyou mean? Tried this -{{ product_list.all.image_set.0.image.url }}?