<p>Number of Images: {{ imageList.count }}</p>
{% for image in imageList %}
<tr><td>Image Name</td><td>Image File</td></tr>
<tr><td>{{ image.name }}</td><td>{{ image.file }}</td></tr>
{% endfor %}2011/11/25 Ivo Brodien <[email protected]>: > You should pass a list of images to the template and iterate over this list. > > On Nov 25, 2011, at 14:18, marjenni <[email protected]> wrote: > >> Hi all, >> Why does this not work? >> >> {% for i in numberOfImages %} >> <tr> >> <td> {{ images.i}} </td> >> >> numberOfImages is the number of items in the images list. >> >> I have a workaround using images.pop, but ideally i would like to be >> able to use an array index. >> >> all help much appreciated >> >> Mark >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

