From f19240a4047add7415744dc9e6f629e2097b02a4 Mon Sep 17 00:00:00 2001 From: Ondrej Rehounek <ondra.rehounek@seznam.cz> Date: Wed, 16 Nov 2022 17:48:06 +0100 Subject: [PATCH] main: november updates vol. 4 --- main/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/models.py b/main/models.py index 9b26987e..14bfbdf5 100644 --- a/main/models.py +++ b/main/models.py @@ -197,7 +197,9 @@ class MainHomePage( region__isnull=False ).order_by("-date")[:3] - articles_for_article_section = MainArticlePage.objects.order_by("-date") + articles_for_article_section = MainArticlePage.objects.filter( + article_type=ARTICLE_TYPES.PRESS_RELEASE + ).order_by("-date") context["article_main"] = ( articles_for_article_section[0] if articles_for_article_section else None ) -- GitLab