from django.shortcuts import render from django.template import RequestContext #from builder.base import BuildWriting, BuildWritingFeed, BuildMap, BuildPhotos, BuildProjects, BuildSitemap #from jrnl.build import archive_builder, detail_builder, home_builder, rss_builder, map_builder from resume.build import pub_builder, resume_builder from books.build import builder as book_builder from sightings.build import builder as sightings_builder from pages.build import BuildPages, BuildHome from posts.build import BuildJrnl, BuildFieldNotes, BuildSrc, BuildGuide, BuildEssays, BuildRange, BuildFriends, BuildFilms, BuildTrips, BuildSitemap def do_build(request): section = request.GET.get('id', '') context = {} if section == 'builddetails': context = {'message': 'Writing Jrnl Permalinks to Disk'} p = BuildJrnl("posts", "post") p.build_latest() p.build_detail_view() elif section == 'writingarchives': context = {'message': 'Writing Jrnl Archives to Disk'} BuildJrnl("posts", "post").build_arc() elif section == 'buildrss': context = {'message': 'Writing RSS to Disk'} BuildJrnl("posts", "post").build_feed("feed") elif section == 'sitemap': context = {'message': 'Writing Sitemap to Disk'} BuildSitemap("posts", "post").build() elif section == 'homepage': context = {'message': 'Writing index to Disk'} BuildHome("pages", "homepage").build() elif section == 'films': context = {'message': 'Writing films to Disk'} BuildFilms("posts", "post").build() elif section == 'trips': context = {'message': 'Writing trips to Disk'} BuildTrips("posts", "trip").build() elif section == 'essays': context = {'message': 'Writing essays to Disk'} BuildEssays("posts", "post").build() elif section == 'src': context = {'message': 'Writing src section to Disk'} BuildSrc("posts", "post").build() elif section == 'guide': context = {'message': 'Writing guide section to Disk'} BuildGuide("posts", "post").build() elif section == 'range': context = {'message': 'Writing Range to Disk'} BuildRange("posts", "post").build() elif section == 'friends': context = {'message': 'Writing Friends to Disk'} BuildFriends("posts", "post").build() elif section == 'pages': context = {'message': 'Writing Pages to Disk'} BuildPages("pages", "page", 'luxagraf.net').build() elif section == 'fieldnotes': context = {'message': 'Writing FieldNotes to Disk'} BuildFieldNotes("posts", "post").build() elif section == 'buildbooks': context = {'message': 'Writing Book Pages to Disk'} book_builder() elif section == 'buildsightings': context = {'message': 'Writing Sightings Pages to Disk'} sightings_builder() elif section == 'resume': context = {'message': 'Writing Resume to Disk'} resume_builder() elif section == 'pubs': context = {'message': 'Writing Publications to Disk'} pub_builder() elif section == 'map': context = {'message': 'Writing Map to Disk'} map_builder() elif section == 'discursivepages': context = {'message': 'Writing Discursive Meditation Pages to Disk'} BuildPages("pages", "page", 'discursivemeditation.com').build() return render(request, 'admin/message.html', context)