summaryrefslogtreecommitdiff
path: root/app/builder/base.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2014-11-02 10:17:19 -0500
committerluxagraf <sng@luxagraf.net>2014-11-02 10:17:19 -0500
commita12365dae4798471eb59758fe870b34491123f3a (patch)
tree25acc6fecb80126e48e79f85838b700ff3186f3b /app/builder/base.py
parent27737a16074f8dd9abb34a851b95b4bc56f28fcf (diff)
rewrote blog to make homepage banner an optional thing for each post.
defaults to false
Diffstat (limited to 'app/builder/base.py')
-rw-r--r--app/builder/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/builder/base.py b/app/builder/base.py
index 59dcef8..97140e5 100644
--- a/app/builder/base.py
+++ b/app/builder/base.py
@@ -139,8 +139,9 @@ class BuildWriting(Build):
self.write_file(fpath, t)
def build_homepage(self):
+ banner = get_model('blog', 'entry').objects.filter(status__exact=1, home_page_banner=1)[:1]
qs = get_model('blog', 'entry').objects.filter(status__exact=1)[:4]
- c = Context({'object_list': qs, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL})
+ c = Context({'object_list': qs, 'banner':banner, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL})
t = render_to_string('archives/homepage.html', c).encode('utf-8')
self.write_file('', t)