Added comment explaining the purpose of results_image.html

This commit is contained in:
Karl Hobley 2015-12-15 14:52:54 +00:00
parent 43ac882e5d
commit c05e115087

View file

@ -1,4 +1,19 @@
{% comment %}
Separated out of results.html to prevent invalid images from crashing the entire
images listing. (issue #1805)
If an error is raised inside a template include, the error is caught by the
calling {% include %} tag and the contents blanked out.
This behaviour caused a confusing error on the images listing view where it
would go blank if one of the images was invalid.
Separating the image rendering code into this file allows us to limit Django's
crash/blanking behaviour to a single image so the listing can still be used when
the issue occurs.
{% endcomment %}
{% load wagtailimages_tags wagtailadmin_tags %}
{% load i18n %}
<div class="image">{% image image max-165x165 class="show-transparency" %}</div>
<div class="image">{% image image max-165x165 class="show-transparency" %}</div>