diff options
Diffstat (limited to 'app/posts/build.py')
-rw-r--r-- | app/posts/build.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/posts/build.py b/app/posts/build.py index 77611f9..80d5a11 100644 --- a/app/posts/build.py +++ b/app/posts/build.py @@ -41,3 +41,24 @@ class BuildGuide(BuildNew): def guide_builder(): j = BuildGuide("posts", "post") j.build() + + + +class BuildFieldNotes(BuildNew): + + def get_model_queryset(self): + return self.model.objects.filter(post_type=PostType.FIELD_NOTE).filter(status__exact=1).order_by('-pub_date') + + def build(self): + self.build_detail_view() + self.build_list_view( + base_path=reverse("fieldnotes:list"), + paginate_by=24 + ) + self.build_year_view("fieldnotes:list_year") + self.build_month_view("fieldnotes:list_month") + + +def fieldnotes_builder(): + j = BuildFieldNotes("posts", "post") + j.build() |