Add default order for solutions and syntheses

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-04-13 10:05:00 +02:00
parent fb4edccc40
commit 9797268736
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 2 additions and 0 deletions

View File

@ -566,6 +566,7 @@ class Solution(models.Model):
verbose_name = _("solution") verbose_name = _("solution")
verbose_name_plural = _("solutions") verbose_name_plural = _("solutions")
unique_together = (('participation', 'problem', 'final_solution', ), ) unique_together = (('participation', 'problem', 'final_solution', ), )
ordering = ('participation__team__trigram', 'problem',)
class Synthesis(models.Model): class Synthesis(models.Model):
@ -609,6 +610,7 @@ class Synthesis(models.Model):
verbose_name = _("synthesis") verbose_name = _("synthesis")
verbose_name_plural = _("syntheses") verbose_name_plural = _("syntheses")
unique_together = (('participation', 'passage', 'type', ), ) unique_together = (('participation', 'passage', 'type', ), )
ordering = ('passage__pool__round', 'type',)
class Note(models.Model): class Note(models.Model):