diff options
author | luxagraf <sng@luxagraf.net> | 2012-10-14 22:50:26 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2012-10-14 22:50:26 -0400 |
commit | 190ba2096aee40c569dcb858ca796961d051fba1 (patch) | |
tree | e29ce65ed2859e95c5c996e2b8421eeae779c960 /app/builder/base.py | |
parent | 91f1ab37b2dda0108e44c840f00d9bb9ca0570ec (diff) |
added functions to build homepage and pub a new post
Diffstat (limited to 'app/builder/base.py')
-rw-r--r-- | app/builder/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/builder/base.py b/app/builder/base.py index 49f1989..bfbbf72 100644 --- a/app/builder/base.py +++ b/app/builder/base.py @@ -116,8 +116,8 @@ class BuildWriting(Build): self.write_file(fpath,t) def build_homepage(self): - qs = get_model('blog', 'entry').objects.filter(status__exact=1).latest() - c = Context({'featured':qs,'MEDIA_URL':settings.BAKED_MEDIA_URL, 'IMAGES_URL':settings.BAKED_IMAGES_URL}) + 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}) t = render_to_string('archives/homepage.html',c).encode('utf-8') self.write_file('',t) |