summaryrefslogtreecommitdiff
path: root/app/jrnl
diff options
context:
space:
mode:
Diffstat (limited to 'app/jrnl')
-rw-r--r--app/jrnl/models.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/jrnl/models.py b/app/jrnl/models.py
index d19e39d..874da74 100644
--- a/app/jrnl/models.py
+++ b/app/jrnl/models.py
@@ -43,13 +43,23 @@ def parse_image(s):
i = LuxImage.objects.get(image__icontains=src)
cl = img['class']
caption = False
+ exif = False
if len(cl) > 1:
css_class = cl[0]
if cl[1] == 'caption':
caption = True
+ if cl[1] == 'exif':
+ exif = True
+ if len(cl) > 2:
+ css_class = cl[0]
+ if cl[1] == 'caption':
+ caption = True
+ if cl[2] == 'exif':
+ exif = True
+ print('caption'+str(caption))
else:
css_class = cl[0]
- c = Context({'image': i, 'caption': caption})
+ c = Context({'image': i, 'caption': caption, 'exif': exif})
return render_to_string("lib/img_%s.html" % css_class, c)