mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-13 09:43:10 +00:00
Added comment explaining the purpose of results_image.html
This commit is contained in:
parent
43ac882e5d
commit
c05e115087
1 changed files with 16 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue