From 8b5bd0dd5f971bbd060f7345ce8b203178c2f720 Mon Sep 17 00:00:00 2001 From: kovacspe Date: Sat, 14 Dec 2024 22:38:56 +0100 Subject: [PATCH 1/2] Spravny ordering Postov --- cms/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/views.py b/cms/views.py index 9a3ab8e..f908863 100644 --- a/cms/views.py +++ b/cms/views.py @@ -54,7 +54,7 @@ class PostViewSet(viewsets.ModelViewSet): filterset_fields = ['sites'] search_fields = ['caption', 'short_text', 'details'] ordering_fields = ['added_at', 'visible_until', 'visible_after'] - ordering = ['added_at'] + ordering = ['-added_at'] @action(detail=False) def visible(self, request): From 4930b3441634af0e740e3157dad3ab9fe8cf127f Mon Sep 17 00:00:00 2001 From: kovacspe Date: Sat, 14 Dec 2024 22:49:27 +0100 Subject: [PATCH 2/2] Zmeneny ordering serii --- competition/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/competition/models.py b/competition/models.py index 140204d..5ed9344 100644 --- a/competition/models.py +++ b/competition/models.py @@ -285,7 +285,7 @@ class Series(models.Model): class Meta: verbose_name = 'séria' verbose_name_plural = 'série' - ordering = ['semester', '-order', ] + ordering = ['semester', 'order', ] semester = models.ForeignKey( Semester, verbose_name='semester', on_delete=models.CASCADE)