aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2017-09-24 17:16:10 +0200
committerAlban Gruin2017-09-24 17:16:10 +0200
commite30b0c673cae607175c5bae6df6e87d8b100bdf3 (patch)
tree2ffc269ad5e56ff93e2ecd3bded5843a585c4fe7 /models.py
parent77748ec01d1ef59d8436597a9b52675b309e1c4d (diff)
Suppression du modèle LastUpdate, utilisation du champ last_update à
la place.
Diffstat (limited to 'models.py')
-rw-r--r--models.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/models.py b/models.py
index 4a25b01..5128c8a 100644
--- a/models.py
+++ b/models.py
@@ -62,24 +62,6 @@ class Timetable(SlugModel):
verbose_name_plural = "emplois du temps"
-class LastUpdate(models.Model):
- timetable = models.ForeignKey(Timetable, on_delete=models.CASCADE, verbose_name="emploi du temps")
- week = models.IntegerField(verbose_name="semaine")
- year = models.IntegerField(verbose_name="année")
- date = models.DateTimeField(verbose_name="date de mise à jour")
-
- updated_at = models.DateTimeField(verbose_name="date de publication", null=True)
-
- def __str__(self):
- return "{0}, semaine {1} de {2}".format(self.timetable, self.week, self.year)
-
-
- class Meta:
- unique_together = ("timetable", "week", "year",)
- verbose_name = "dernière mise à jour"
- verbose_name_plural = "dernières mises à jour"
-
-
class GroupManager(Manager):
def get_relevant_groups(self, *args, **criteria):
return self.get_queryset().filter(*args, **criteria).annotate(children_count=Count("children")).filter(children_count=0)