Get first item of QuerySet in template
Since Django 1.6 you can do
<img src="{{ entry.image_set.first.get_absolute_url }}">
You also can do:
entry.image_set.all.0
in your template.
Not any shorter, but you could use first
:
{% with entry.image_set.all|first as image %}
<img src="{{ image.get_absolute_url }}">
{% endwith %}