Skip to content
Snippets Groups Projects
Commit facd2b5d authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

fix people link & include shared articles on homepage

parent cf3327da
Branches
No related tags found
2 merge requests!861Release: New homepage design,!848fix people link & include shared articles on homepage
Pipeline #15939 passed
...@@ -198,17 +198,12 @@ class MainHomePage( ...@@ -198,17 +198,12 @@ class MainHomePage(
def get_context(self, request, *args, **kwargs): def get_context(self, request, *args, **kwargs):
context = super().get_context(request, args, kwargs) context = super().get_context(request, args, kwargs)
context["article_data_list"] = MainArticlePage.objects.live().order_by("-date")[ context["article_data_list"] = self.materialize_shared_articles_query(
:3 self.append_all_shared_articles_query(MainArticlePage.objects.live().all())
] .live()
.order_by("-union_date")
articles_for_article_section = self.materialize_shared_articles_query( [:3]
self.append_all_shared_articles_query(MainArticlePage.objects.all())[:8]
)
context["article_main"] = (
articles_for_article_section[0] if articles_for_article_section else None
) )
context["article_carousel_list"] = articles_for_article_section[1:8]
return context return context
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
xl:py-24 xl:py-24
" "
> >
{% include 'main/includes/atoms/buttons/round_button.html' with classes='inline-block bg-white text-black' button_text="Další lidé" %} {% include 'main/includes/atoms/buttons/round_button.html' with url=page.root_page.people_page.url classes='inline-block bg-white text-black' button_text="Další lidé" %}
</div> </div>
</div> </div>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment