diff options
author | luxagraf <sng@luxagraf.net> | 2012-10-14 22:42:13 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2012-10-14 22:42:13 -0400 |
commit | 91f1ab37b2dda0108e44c840f00d9bb9ca0570ec (patch) | |
tree | d658f993c2695dae0b50cc89a1515aa00b855461 /app/builder/views.py | |
parent | 37ca84e1f55e14b87b1f8d9e02e81d9b55efca85 (diff) |
renamed build to builder and delted extraneous files in builder and blog app
Diffstat (limited to 'app/builder/views.py')
-rw-r--r-- | app/builder/views.py | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/app/builder/views.py b/app/builder/views.py new file mode 100644 index 0000000..0dee430 --- /dev/null +++ b/app/builder/views.py @@ -0,0 +1,74 @@ +from django.http import HttpResponseRedirect +from django.core.urlresolvers import reverse +from django.shortcuts import render_to_response,get_object_or_404,redirect + +from django.template import RequestContext + +from builder.base import BuildWriting, BuildWritingFeed, BuildMap, BuildPages, BuildPhotos,BuildAbout,BuildProjects,BuildSitemap,BuildContact +def do_build(request): + section = request.GET.get('id', '') + if section != '': + + #build writing archives + if section == 'writing': + BuildWriting().build() + context = {'message': 'Writing Posts to Disk',} + + #build photo galleries + elif section == 'photos': + BuildPhotos().build() + context = {'message': 'Writing Photo Galleries to Disk',} + + #build project pages + elif section == 'projects': + BuildProjects().build() + context = {'message': 'Writing Project pages to Disk',} + + #build pages + elif section == 'pages': + BuildPages().build() + context = {'message': 'Writing Pages to Disk',} + + #build map + elif section == 'map': + BuildMap().build() + context = {'message': 'Writing Map to Disk',} + + #build Writing RSS Feed + elif section == 'feed': + BuildWritingFeed().build() + context = {'message': 'Writing RSS Feed to Disk',} + + #build Sitemap + elif section == 'sitemap': + BuildSitemap().build() + context = {'message': 'Writing Sitemap to Disk',} + + """ + elif section == 'all': + g.build_entire_site() + context = {'message': 'Writing Entire Site to disk',} + elif section == 'newpost': + g.create_new_post() + #build writing archives + #BuildWriting().build() + #build map + #build homepage + #build feed + #build sitemap + context = {'message': 'Publishing New Post',} + + elif section == 'home': + g.create_homepage() + context = {'message': 'Writing Homepage to Disk',} + + """ + + else: + context = {} + #return redirect('/admin/', message='test') + return render_to_response('admin/message.html', context, context_instance = RequestContext(request)) + #return HttpResponseRedirect(reverse('admin:index')) + + + |