summaryrefslogtreecommitdiff
path: root/app/utils/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/utils/util.py')
-rw-r--r--app/utils/util.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/app/utils/util.py b/app/utils/util.py
index 32a9838..5370d7a 100644
--- a/app/utils/util.py
+++ b/app/utils/util.py
@@ -78,43 +78,29 @@ def parse_image(s):
image_id = img['id'].split("image-")[1]
i = apps.get_model('media', 'LuxImage').objects.get(pk=image_id)
caption = False
- exif = False
cluster_class = None
is_cluster = False
- extra = None
if cl[0] == 'cluster':
- css_class = cl[0]
is_cluster = True
cluster_class = cl[1]
+ css_class = cl[0]
try:
if cl[2] == 'caption':
caption = True
- elif cl[2] == 'exif':
- exif = True
- else:
- extra = cl[2]
-
- if len(cl) > 3:
- if cl[3] == 'exif':
- exif = True
except:
pass
elif cl[0] != 'cluster' and len(cl) > 1:
css_class = cl[0]
if cl[1] == 'caption':
caption = True
- if cl[1] == 'exif':
- exif = True
elif cl[0] != 'cluster' and 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]
- return render_to_string("lib/img_%s.html" % css_class, {'image': i, 'caption': caption, 'exif': exif, 'is_cluster': is_cluster, 'cluster_class': cluster_class, 'extra': extra})
+ return render_to_string("lib/img_%s.html" % css_class, {'image': i, 'caption': caption, 'is_cluster': is_cluster, 'cluster_class': cluster_class})
except KeyError:
''' regular inline image, not a luximage '''
return str(img)