Hi,
If you're using the django template language, use a dot instead of [].
Try this: {{ item.0.image.url }}
For {{ foo.bar }}, the django template language tries the following:
foo[bar]# dict lookup
foo.bar# property
foo[int(bar)]# index lookup
foo.bar()# callable
Reference for
hi,
i am trying to display a set of images with the use of index.
here is the code:
{% for item in product.productimage_set.all %}
{% endfor %}
the above code is displaying a set of images for one product .right.
i want to displa
2 matches
Mail list logo