diff options
author | luxagraf <sng@luxagraf.net> | 2014-11-02 10:17:19 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2014-11-02 10:17:19 -0500 |
commit | a12365dae4798471eb59758fe870b34491123f3a (patch) | |
tree | 25acc6fecb80126e48e79f85838b700ff3186f3b /app/builder/base.py | |
parent | 27737a16074f8dd9abb34a851b95b4bc56f28fcf (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.py | 3 |
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) |