diff options
author | luxagraf <sng@luxagraf.net> | 2020-11-19 08:28:08 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-11-19 08:28:08 -0500 |
commit | 18a86bb882daeda3c9170a0f608386dbb42929eb (patch) | |
tree | 55e88d0dc42f6600eaefa005815bd5d53bb98916 /app/posts | |
parent | bcb8a8e367c308e89204a287fc9c531fe97c5035 (diff) |
fixed view bug in essays
Diffstat (limited to 'app/posts')
-rw-r--r-- | app/posts/views/guide_views.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/posts/views/guide_views.py b/app/posts/views/guide_views.py index 767a262..e2f98f3 100644 --- a/app/posts/views/guide_views.py +++ b/app/posts/views/guide_views.py @@ -35,12 +35,13 @@ class ReviewsListView(GuideListView): return context -class EssayListView(GuideListView): +class EssayListView(PaginatedListView): + model = Post template_name = "posts/essay_list.html" def get_queryset(self): queryset = super(EssayListView, self).get_queryset() - return queryset.filter(post_type__in=[2,]).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image') + return queryset.filter(site__domain='luxagraf.net').filter(post_type__in=[PostType.ESSAY]).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image') def get_context_data(self, **kwargs): ''' |