On Nov 4, 7:45 am, Tonne <[EMAIL PROTECTED]> wrote:
> I think I may be barking up the wrong tree, and if so please excuse
> the above. I now suspect that I should be associating the images with
> their relevant entries with template tags.

You don't even need to do that. Assuming you have a queryset of Entry
objects as a variable called 'entries':

{% for entry in entries %}
<h2>{{ entry.title }}</h2>
    {% for image in entry.image_set.all %}
    <img src='{{ image.image }}'>
    {% endfor %}
{% endfor %}

Obviously change the mark-up to suit.
You would need a template tag if you wanted to filter the list of
related images based on some extra criteria, since you can't pass in
parameters to filter via the plain template language.

--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to