diff options
author | luxagraf <sng@luxagraf.net> | 2020-11-15 13:47:57 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-11-15 13:47:57 -0500 |
commit | 466b071fe637cd8d508659de509caeeb013ac9d7 (patch) | |
tree | 99ec179ea14e2370129b14a0687b9f75941b440e | |
parent | 6c4a847f047c2b6e1291cab63f01503b3b5da131 (diff) |
fixed some build issues
-rw-r--r-- | app/builder/views.py | 8 | ||||
-rw-r--r-- | app/pages/build.py | 8 | ||||
-rw-r--r-- | app/posts/build.py | 7 |
3 files changed, 9 insertions, 14 deletions
diff --git a/app/builder/views.py b/app/builder/views.py index 5e67dc2..659fde0 100644 --- a/app/builder/views.py +++ b/app/builder/views.py @@ -7,9 +7,9 @@ from books.build import builder as book_builder from sightings.build import builder as sightings_builder from photos.build import builder as photo_builder #from notes.build import builder as notes_builder -from pages.build import builder as page_builder +from pages.build import BuildPages, BuildHome from photos.build import dailybuilder -from posts.build import BuildJrnl, BuildFieldNotes, BuildSrc, BuildGuide, BuildHome +from posts.build import BuildJrnl, BuildFieldNotes, BuildSrc, BuildGuide from lttr.build import lttr_builder def do_build(request): @@ -28,7 +28,7 @@ def do_build(request): BuildJrnl("posts", "post").build_feed("jrnl:feed") elif section == 'homepage': context = {'message': 'Writing index to Disk'} - BuildHome("posts", "post").homepage() + BuildHome("pages", "home").build() elif section == 'src': context = {'message': 'Writing src section to Disk'} BuildSrc("posts", "post").build() @@ -37,7 +37,7 @@ def do_build(request): BuildGuide("posts", "post").build() elif section == 'pages': context = {'message': 'Writing Pages to Disk'} - page_builder() + BuildPages("pages", "page").build() elif section == 'fieldnotes': context = {'message': 'Writing FieldNotes to Disk'} BuildFieldNotes("posts", "post").build() diff --git a/app/pages/build.py b/app/pages/build.py index 2309983..4e48448 100644 --- a/app/pages/build.py +++ b/app/pages/build.py @@ -15,6 +15,8 @@ class BuildPages(BuildNew): return self.model.objects.filter(build=True) -def builder(): - j = BuildPages("pages", "Page") - j.build() +class BuildHome(BuildNew): + + def build(self): + response = self.client.get('/') + self.write_file('', response.content) diff --git a/app/posts/build.py b/app/posts/build.py index e6370b9..47a6efe 100644 --- a/app/posts/build.py +++ b/app/posts/build.py @@ -108,10 +108,3 @@ class BuildJrnl(BuildNew): def build_latest(self): response = self.client.get('/jrnl/latest/') self.write_file(reverse("jrnl:latest"), response.content) - - -class BuildHome(BuildNew): - - def build(self): - response = self.client.get('/') - self.write_file('', response.content) |