diff options
author | luxagraf <sng@luxagraf.net> | 2014-09-30 01:33:20 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2014-09-30 01:33:20 +0000 |
commit | 544946397c831c42db47c892db4f7c6a40c93809 (patch) | |
tree | 5fd1c935215ada8929065084f1b9139bee9ef7c9 /app | |
parent | 509110acad7fa7e1e5adcfc413e4be7b8ed62474 (diff) |
few bug fixes for builder and templates
Diffstat (limited to 'app')
-rw-r--r-- | app/blog/models.py | 7 | ||||
-rw-r--r-- | app/builder/base.py | 2 |
2 files changed, 7 insertions, 2 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): diff --git a/app/builder/base.py b/app/builder/base.py index 2845225..59dcef8 100644 --- a/app/builder/base.py +++ b/app/builder/base.py @@ -288,4 +288,4 @@ class BuildMap(Build): 'IMAGES_URL': settings.BAKED_IMAGES_URL }) t = render_to_string('archives/map.html', c).encode('utf-8') - self.write_file('map', t) + self.write_file('', t, "html",'map') |