From 773e6e8a82756dae862e730c691c75250a2e4489 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Wed, 6 Sep 2017 14:30:37 +0200 Subject: Disruption du fonctionnement de LastUpdate. Au lieu de stocker seulement la date de la dernière mise à jour, on stocke toutes les mises à jour. --- models.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'models.py') diff --git a/models.py b/models.py index d78e12b..5646a07 100644 --- a/models.py +++ b/models.py @@ -50,9 +50,9 @@ class LastUpdate(models.Model): class Meta: - unique_together = ("timetable", "week", "year",) - verbose_name = "dernière mise à jour" - verbose_name_plural = "dernières mises à jour" + unique_together = ("timetable", "week", "year", "date",) + verbose_name = "mise à jour" + verbose_name_plural = "mises à jour" class GroupManager(Manager): @@ -183,8 +183,7 @@ class CourseDelta(models.Model): DELETED = 1 OPERATION_CHOICE = ( (ADDED, "Ajouté"), - (DELETED, "Supprimé"), - ) + (DELETED, "Supprimé"),) course = models.ForeignKey(Course, verbose_name="cours") update = models.ForeignKey(LastUpdate, verbose_name="mise à jour") -- cgit v1.2.1