aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--models.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/models.py b/models.py
index fbbf877..bfc026b 100644
--- a/models.py
+++ b/models.py
@@ -92,11 +92,6 @@ class Group(models.Model):
mention = models.CharField(max_length=128)
subgroup = models.CharField(max_length=1, verbose_name="sous-groupe",
null=True)
- td = models.IntegerField(verbose_name="groupe de TD", null=True)
- tp = models.IntegerField(verbose_name="groupe de TP", null=True)
- parent = models.ForeignKey("self", verbose_name="groupe parent", null=True,
- default=None, related_name="children")
-
slug = models.SlugField(max_length=64, default="")
hidden = models.BooleanField(verbose_name="caché", default=False)
@@ -110,7 +105,7 @@ class Group(models.Model):
@property
def group_info(self):
- return self.timetable.id, self.mention, self.subgroup, self.td, self.tp
+ return self.timetable.id, self.mention, self.subgroup
def __str__(self):
return self.name
@@ -120,12 +115,12 @@ class Group(models.Model):
self.name = self.celcat_name
self.slug = slugify(self.name)
- self.mention, self.subgroup, self.td, self.tp = parse_group(self.name)
+ self.mention, self.subgroup = parse_group(self.name)
super(Group, self).save()
class Meta:
- index_together = ("mention", "subgroup", "td", "tp",)
+ index_together = ("mention", "subgroup",)
unique_together = (("name", "timetable",),
("celcat_name", "timetable",),
("slug", "timetable",),)