diff options
author | luxagraf <sng@luxagraf.net> | 2015-12-07 21:31:43 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-12-07 21:31:43 -0500 |
commit | 5dc9b251a29c79fdd0dafc9ef79318e8f213cb3a (patch) | |
tree | 4b586df9bac055907ae35f94c1c7fa67f40a3465 /app/resume/build.py | |
parent | 6ad212ae8a542e93d173c2b8e6efcd68109380c8 (diff) |
added builder to resume section
Diffstat (limited to 'app/resume/build.py')
-rw-r--r-- | app/resume/build.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/app/resume/build.py b/app/resume/build.py index 2b472a4..9d6ad60 100644 --- a/app/resume/build.py +++ b/app/resume/build.py @@ -1,6 +1,7 @@ import os from django.core.urlresolvers import reverse from builder.base import BuildNew +from pages.models import Page class BuildResume(BuildNew): @@ -8,17 +9,14 @@ class BuildResume(BuildNew): def build(self): self.build_detail_view() self.build_list_view( - base_path=reverse("resume:list"), - paginate_by=99999 + base_path=reverse("resume:live_redirect"), + paginate_by=8 ) def get_model_queryset(self): return self.model.objects.all() def build_detail_view(self): - ''' - write out my backups of published articles - ''' for obj in self.get_model_queryset(): url = obj.get_absolute_url() path, slug = os.path.split(url) @@ -28,6 +26,19 @@ class BuildResume(BuildNew): print(path, slug) self.write_file(path, response.content, filename=slug) + def build_pages(self): + ''' + build out /resume and /resume/cv + ''' + pages = Page.objects.filter(app="resume") + for obj in pages: + url = obj.get_absolute_url() + path, slug = os.path.split(url) + path = '%s/' % path + # write html + response = self.client.get(url) + print(path, slug) + self.write_file(path, response.content, filename=slug) def builder(): j = BuildResume("resume", "pubitem") |