]> git.0d.be Git - chloro.git/commitdiff
do not include non-feed posts on homepage main
authorFrédéric Péters <fpeters@0d.be>
Sun, 17 Dec 2023 16:44:57 +0000 (17:44 +0100)
committerFrédéric Péters <fpeters@0d.be>
Sun, 17 Dec 2023 16:44:57 +0000 (17:44 +0100)
chloro/phyll/views.py

index 2a30215854abe79e3a602c0ab3aaea3aa26cd23b..a7f45e77059c7c7a92c61f1814a1dc2c664583a8 100644 (file)
@@ -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