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

first 3 & fix ordering

parent ad338c92
No related branches found
No related tags found
2 merge requests!838Release,!837Dary - Filter live projects
Pipeline #15753 passed
...@@ -410,7 +410,13 @@ class DonateProjectIndexPage( ...@@ -410,7 +410,13 @@ class DonateProjectIndexPage(
@property @property
def projects(self): def projects(self):
return DonateProjectPage.objects.child_of(self).distinct().live().all() return (
DonateProjectPage.objects.child_of(self)
.filter()
.distinct()
.order_by("-date")
.live()
)[:3]
class Meta: class Meta:
verbose_name = "Přehled projektů" verbose_name = "Přehled projektů"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment