From f116a1243f4da3fb8c54b42956eb9b76107024ab Mon Sep 17 00:00:00 2001 From: Elrond Date: Fri, 23 Mar 2012 18:35:43 +0100 Subject: [PATCH] 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. --- mediagoblin/templates/mediagoblin/utils/exif.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/utils/exif.html b/mediagoblin/templates/mediagoblin/utils/exif.html index 37f274fe..a89e69c8 100644 --- a/mediagoblin/templates/mediagoblin/utils/exif.html +++ b/mediagoblin/templates/mediagoblin/utils/exif.html @@ -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 %}

EXIF

- {% for key, tag in media.media_data.exif.useful.items() %} + {% for key, tag in media.exif_display_iter() %}
{{ key }} {{ tag.printable }}