diff options
author | luxagraf <sng@luxagraf.net> | 2020-12-04 15:55:43 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-12-04 15:55:43 -0500 |
commit | 05fd07a6b4d2f21462880fad6c2bd26237cd3fc2 (patch) | |
tree | aa949ca1753a8b8844f375b25ec8535e5de91e42 /app/posts/build.py | |
parent | cdaa099a3988b1487b6728215adbf1dc6c2c58fe (diff) |
updated essay builder
Diffstat (limited to 'app/posts/build.py')
-rw-r--r-- | app/posts/build.py | 13 |
1 files changed, 13 insertions, 0 deletions
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() |