diff options
Diffstat (limited to 'app/builder')
-rw-r--r-- | app/builder/base.py | 4 | ||||
-rw-r--r-- | app/builder/views.py | 18 |
2 files changed, 12 insertions, 10 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) diff --git a/app/builder/views.py b/app/builder/views.py index 0dee430..8b9c110 100644 --- a/app/builder/views.py +++ b/app/builder/views.py @@ -48,22 +48,24 @@ def do_build(request): elif section == 'all': g.build_entire_site() context = {'message': 'Writing Entire Site to disk',} + """ + #build Everything need for new post elif section == 'newpost': - g.create_new_post() - #build writing archives - #BuildWriting().build() + #build writing archives/details pages/homepage + BuildWriting().build() #build map - #build homepage + BuildMap().build() #build feed + BuildWritingFeed().build() #build sitemap + BuildSitemap().build() context = {'message': 'Publishing New Post',} - + + #build Homepage elif section == 'home': - g.create_homepage() + BuildWriting().build_homepage() context = {'message': 'Writing Homepage to Disk',} - """ - else: context = {} #return redirect('/admin/', message='test') |