aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2017-11-27 16:25:25 +0100
committerAlban Gruin2017-11-27 16:25:25 +0100
commitd0c69d3095d14f5509190d6b637cc0c018e53a19 (patch)
tree1d6db81e66945ef0620f3979059a9afe7b136610 /models.py
parent3efa5da22447fee662d81ebafb21b5e9b9f796fc (diff)
Changement des champs timetable en source pour plus de clareté
Diffstat (limited to 'models.py')
-rw-r--r--models.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/models.py b/models.py
index eba8f1c..3c9fa27 100644
--- a/models.py
+++ b/models.py
@@ -101,8 +101,8 @@ class Group(SlugModel):
name = models.CharField(max_length=255, verbose_name="nom")
celcat_name = models.CharField(max_length=255,
verbose_name="nom dans Celcat")
- timetable = models.ForeignKey(Source, on_delete=models.CASCADE,
- verbose_name="emploi du temps")
+ source = models.ForeignKey(Source, on_delete=models.CASCADE,
+ verbose_name="source d’emploi du temps")
mention = models.CharField(max_length=128)
semester = models.IntegerField(verbose_name="semestre", null=True)
@@ -142,9 +142,9 @@ class Group(SlugModel):
class Meta:
index_together = ("mention", "semester", "subgroup",)
- unique_together = (("name", "timetable",),
- ("celcat_name", "timetable",),
- ("slug", "timetable",),)
+ unique_together = (("name", "source",),
+ ("celcat_name", "source",),
+ ("slug", "source",),)
verbose_name = "groupe"
verbose_name_plural = "groupes"
@@ -189,8 +189,8 @@ class Course(models.Model):
name = models.CharField(max_length=255, verbose_name="nom", default="Sans nom")
type_ = models.CharField(name="type", max_length=255,
verbose_name="type de cours", null=True)
- timetable = models.ForeignKey(Source, on_delete=models.CASCADE,
- verbose_name="emploi du temps")
+ source = models.ForeignKey(Source, on_delete=models.CASCADE,
+ verbose_name="emploi du temps")
notes = models.TextField(verbose_name="remarques", blank=True, null=True)
groups = models.ManyToManyField(Group, verbose_name="groupes")