From 97972687368e5f69df845aa00998b658833fff4a Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 13 Apr 2021 10:05:00 +0200 Subject: [PATCH] Add default order for solutions and syntheses Signed-off-by: Yohann D'ANELLO --- apps/participation/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/participation/models.py b/apps/participation/models.py index 0411a92..eda1d36 100644 --- a/apps/participation/models.py +++ b/apps/participation/models.py @@ -566,6 +566,7 @@ class Solution(models.Model): verbose_name = _("solution") verbose_name_plural = _("solutions") unique_together = (('participation', 'problem', 'final_solution', ), ) + ordering = ('participation__team__trigram', 'problem',) class Synthesis(models.Model): @@ -609,6 +610,7 @@ class Synthesis(models.Model): verbose_name = _("synthesis") verbose_name_plural = _("syntheses") unique_together = (('participation', 'passage', 'type', ), ) + ordering = ('passage__pool__round', 'type',) class Note(models.Model):