summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README7
-rw-r--r--app/builder/base.py4
-rw-r--r--app/builder/views.py18
3 files changed, 16 insertions, 13 deletions
diff --git a/README b/README
index 1d6587e..8dc3b4d 100644
--- a/README
+++ b/README
@@ -7,8 +7,9 @@ What I should do is refactor both into a single clean module with methods for bu
# each section individually
* All Writing pages -- done
* All Photo -- done
- * All Projects
- * Links
+ * All Projects --done
+ * All Pages (about, contact, etc) -- done
+ * Links
# Everything needed to post a new entry...
* writing archives
* map
@@ -18,7 +19,7 @@ What I should do is refactor both into a single clean module with methods for bu
# Individual pages that need periodic rebuilding
* feed -- done
* sitemap -- done
- * map
+ * map -- done
# The whole goddamn thing.
In build each model has a build function that calls all the routines necessary to build everything. I like that model, but then I need to expose those functions a bit more.
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')