summaryrefslogtreecommitdiff
path: root/app/blog/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/blog/models.py')
-rw-r--r--app/blog/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/blog/models.py b/app/blog/models.py
index 12b5b28..2e30ccc 100644
--- a/app/blog/models.py
+++ b/app/blog/models.py
@@ -92,6 +92,16 @@ class Entry(models.Model):
image_dir, img = self.image.url.split('post-images/')[1].split('/')
return '%spost-images/%s/%s' % (settings.IMAGES_URL, image_dir, img)
+ def get_image_wide_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/%s' % (img)
+
+ 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)
+
@property
def state(self):
return self.location.state