From 05fd07a6b4d2f21462880fad6c2bd26237cd3fc2 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 4 Dec 2020 15:55:43 -0500 Subject: updated essay builder --- app/posts/build.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/posts/build.py') diff --git a/app/posts/build.py b/app/posts/build.py index 47a6efe..7bd191a 100644 --- a/app/posts/build.py +++ b/app/posts/build.py @@ -108,3 +108,16 @@ class BuildJrnl(BuildNew): def build_latest(self): response = self.client.get('/jrnl/latest/') self.write_file(reverse("jrnl:latest"), response.content) + + +class BuildEssays(BuildNew): + + def get_model_queryset(self): + return self.model.objects.filter(post_type=PostType.ESSAY).filter(status__exact=1).order_by('-pub_date') + + def build(self): + self.build_list_view( + base_path=reverse("essays:list"), + paginate_by=50 + ) + self.build_detail_view() -- cgit v1.2.3-70-g09d2