diff options
author | Alban Gruin | 2017-02-05 13:40:25 +0100 |
---|---|---|
committer | Alban Gruin | 2017-02-05 13:40:25 +0100 |
commit | 5363b70a7840f937f710e0a85fa83e48a35e083a (patch) | |
tree | 35371c3fc4b76a533293e97715faba87e4160fe5 /models.py | |
parent | 49eca350c06d9c3e2c45a1215e2d98acee0535c1 (diff) |
RĂ©-introduction du slug de l'emploi du temps dans les urls
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -51,7 +51,7 @@ class Group(models.Model): td = models.IntegerField(verbose_name="groupe de TD", null=True) tp = models.IntegerField(verbose_name="groupe de TP", null=True) - slug = models.SlugField(max_length=64, unique=True, default="") + slug = models.SlugField(max_length=64, default="") def corresponds_to(self, timetable_id, mention, subgroup, td, tp): return self.timetable.id == timetable_id and self.mention == mention and self.subgroup == subgroup and (self.td == td or self.td is None or td is None) and (self.tp == tp or self.tp is None or tp is None) @@ -83,7 +83,7 @@ class Group(models.Model): class Meta: index_together = ("mention", "subgroup", "td", "tp",) - unique_together = (("name", "timetable",), ("celcat_name", "timetable",),) + unique_together = (("name", "timetable",), ("celcat_name", "timetable",), ("slug", "timetable",),) verbose_name = "groupe" verbose_name_plural = "groupes" |