summaryrefslogtreecommitdiff
path: root/app/blog
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2014-09-30 01:33:20 +0000
committerluxagraf <sng@luxagraf.net>2014-09-30 01:33:20 +0000
commit544946397c831c42db47c892db4f7c6a40c93809 (patch)
tree5fd1c935215ada8929065084f1b9139bee9ef7c9 /app/blog
parent509110acad7fa7e1e5adcfc413e4be7b8ed62474 (diff)
few bug fixes for builder and templates
Diffstat (limited to 'app/blog')
-rw-r--r--app/blog/models.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/blog/models.py b/app/blog/models.py
index a764c5c..d2fe954 100644
--- a/app/blog/models.py
+++ b/app/blog/models.py
@@ -102,8 +102,13 @@ class Entry(models.Model):
def get_image_hero_url(self):
img = self.image.url.split('post-images/')[1].split('/')[1]
- #return '%shome-images/%s' % (settings.IMAGES_URL, img)
return '/media/images/home-images/hero%s' % (img)
+
+ def get_image_hero_url_sm(self):
+ img = self.image.url.split('post-images/')[1].split('/')[1]
+ import os
+ img = os.path.splitext(img)[0]
+ return '/media/images/home-images/hero%s_sm.jpg' % (img)
@property
def state(self):