Skip to content

Commit

Permalink
Minor PEP8 formatting changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai committed Feb 16, 2011
1 parent 6626805 commit 3c689bc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/metaimage/templatetags/metaimage_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

from django import template
#from photologue.utils import EXIF
register = template.Library()


register = template.Library()


@register.tag(name="print_exif")
def do_print_exif(parser, token):
Expand All @@ -17,7 +18,6 @@ def do_print_exif(parser, token):
return PrintExifNode(exif)



class PrintExifNode(template.Node):

def __init__(self, exif):
Expand All @@ -28,13 +28,10 @@ def render(self, context):
exif = unicode(self.exif.resolve(context, True))
except template.VariableDoesNotExist:
exif = u''
EXPR = "'(?P<key>[^:]*)'\:(?P<value>[^,]*),"
EXPR = "'(?P<key>[^:]*)'\:(?P<value>[^,]*),"
expr = re.compile(EXPR)
msg = "<table>"
msg = "<table>"
for i in expr.findall(exif):
msg += "<tr><td>%s</td><td>%s</td></tr>" % (i[0],i[1])

msg += "<tr><td>%s</td><td>%s</td></tr>" % (i[0], i[1])
msg += "</table>"

return u'<div id="exif">%s</div>' % (msg)

0 comments on commit 3c689bc

Please sign in to comment.