diff options
author | luxagraf <sng@luxagraf.net> | 2016-06-17 10:21:26 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2016-06-17 10:21:26 -0400 |
commit | b658d4b38f1aab3ed1bdc629300392c1b3e9e8fa (patch) | |
tree | 28eefd84cd586f23f1b1e7d96c4b58c229b7e183 /app/jrnl | |
parent | cec274a4b7de8e07a3d7dc29127ba18f0dd42305 (diff) |
fixed notes to be like an instagram for the web also tweaked styles for
picwide captions and added support for show camera make, model and lens
Diffstat (limited to 'app/jrnl')
-rw-r--r-- | app/jrnl/models.py | 12 |
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) |