Changes to display all EXIF information

This commit is contained in:
Gabriel Saldana 2013-03-04 23:19:22 -06:00 committed by Joar Wandborg
parent c732f422ae
commit b3566e1dc7
2 changed files with 4 additions and 6 deletions

View File

@ -229,15 +229,13 @@ class MediaEntryMixin(GenerateSlugMixin):
return licenses.get_license_by_url(self.license or "")
def exif_display_iter(self):
from mediagoblin.tools.exif import USEFUL_TAGS
if not self.media_data:
return
exif_all = self.media_data.get("exif_all")
for key in USEFUL_TAGS:
if key in exif_all:
yield key, exif_all[key]
for key in exif_all:
label = re.sub('(.)([A-Z][a-z]+)', r'\1 \2', key)
yield label.replace('EXIF', '').replace('Image', ''), exif_all[key]
class MediaCommentMixin(object):

View File

@ -134,7 +134,7 @@ def _ratio_to_list(ratio):
def get_useful(tags):
return dict((key, tag) for (key, tag) in tags.iteritems() if key in USEFUL_TAGS)
return dict((key, tag) for (key, tag) in tags.iteritems())
def get_gps_data(tags):