From 137c96fc67cb8f9b66ba5e9f65f00ece1e4b2672 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 17 Dec 2023 17:44:57 +0100 Subject: [PATCH] do not include non-feed posts on homepage --- chloro/phyll/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chloro/phyll/views.py b/chloro/phyll/views.py index 2a30215..a7f45e7 100644 --- a/chloro/phyll/views.py +++ b/chloro/phyll/views.py @@ -84,8 +84,12 @@ class HomeView(TemplateView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) - context['posts'] = Note.objects.filter(published=True).order_by('-creation_timestamp')[:5] - context['recent_changes'] = Note.objects.filter(published=True).order_by('-last_update_timestamp') + context['posts'] = Note.objects.filter(published=True, included_in_feed=True).order_by( + '-creation_timestamp' + )[:5] + context['recent_changes'] = Note.objects.filter(published=True, included_in_feed=True).order_by( + '-last_update_timestamp' + ) context['index'] = Note.objects.filter(slug='index').first() return context -- 2.39.2