diff options
Diffstat (limited to 'app/builder')
-rw-r--r-- | app/builder/base.py | 3 | ||||
-rw-r--r-- | app/builder/views.py | 124 |
2 files changed, 63 insertions, 64 deletions
diff --git a/app/builder/base.py b/app/builder/base.py index 56d4149..9d219d4 100644 --- a/app/builder/base.py +++ b/app/builder/base.py @@ -3,7 +3,6 @@ from math import ceil from decimal import Decimal from django.test.client import Client from django.template.loader import render_to_string -from django.conf import settings from django.template import Context from django.db.models import get_model from django.conf import settings @@ -274,5 +273,5 @@ class BuildAbout(Build): fpath = '%sindex.html' %(path) self.write_file(fpath,t) -class BuildCodeSite(Build): +#class BuildCodeSite(Build): diff --git a/app/builder/views.py b/app/builder/views.py index 9926ff8..f7a4392 100644 --- a/app/builder/views.py +++ b/app/builder/views.py @@ -5,72 +5,72 @@ 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',} + 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',} + #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',} - #build Everything need for new post - elif section == 'newpost': - #build writing archives/details pages/homepage - BuildWriting().build() - #build map - BuildMap().build() - #build feed - BuildWritingFeed().build() - #build sitemap - BuildSitemap().build() - context = {'message': 'Publishing New Post',} - - #build Homepage - elif section == 'home': - BuildWriting().build_homepage() - context = {'message': 'Writing Homepage to Disk',} - """ - elif section == 'all': - g.build_entire_site() - context = {'message': 'Writing Entire Site to disk',} - """ + #build Everything need for new post + elif section == 'newpost': + #build writing archives/details pages/homepage + BuildWriting().build() + #build map + BuildMap().build() + #build feed + BuildWritingFeed().build() + #build sitemap + BuildSitemap().build() + context = {'message': 'Publishing New Post',} + + #build Homepage + elif section == 'home': + BuildWriting().build_homepage() + context = {'message': 'Writing Homepage to Disk',} + """ + elif section == 'all': + g.build_entire_site() + context = {'message': 'Writing Entire Site 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')) + else: + context = {} + #return redirect('/admin/', message='test') + return render_to_response('admin/message.html', context, context_instance = RequestContext(request)) |