Use exif_display_iter in the template.

As the newly created entries have media_data.exif_all use
the exif_display_iter method to calculate the exif entries
for displaying on the fly.

After the mongo migration all the old entries will also
have exif_all and will work again.
This commit is contained in:
Elrond 2012-03-23 18:35:43 +01:00
parent 763ef5b77e
commit f116a1243f

View File

@ -18,11 +18,12 @@
{% block exif_content %}
{% if app_config['exif_visible']
and media.media_data.exif is defined
and media.media_data.exif.has_key('useful') %}
and media.media_data
and media.media_data.exif_all is defined
and media.media_data.exif_all %}
<h3>EXIF</h3>
<table>
{% for key, tag in media.media_data.exif.useful.items() %}
{% for key, tag in media.exif_display_iter() %}
<tr>
<td>{{ key }}</td>
<td>{{ tag.printable }}</td>