diff options
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -19,10 +19,10 @@ class Group(models.Model): name = models.CharField(max_length=255, verbose_name="nom") timetable = models.ForeignKey(Timetable, on_delete=models.CASCADE, verbose_name="emploi du temps") - mention = models.CharField(max_length=32) - subgroup = models.CharField(max_length=1, verbose_name="sous-groupe") - td = models.IntegerField(verbose_name="groupe de TD", null=True) - tp = models.IntegerField(verbose_name="groupe de TP", null=True) + mention = models.CharField(max_length=32, db_index=True) + subgroup = models.CharField(max_length=1, verbose_name="sous-groupe", db_index=True) + td = models.IntegerField(verbose_name="groupe de TD", null=True, db_index=True) + tp = models.IntegerField(verbose_name="groupe de TP", null=True, db_index=True) def __str__(self): return self.name @@ -68,7 +68,7 @@ class Course(models.Model): groups = models.ManyToManyField(Group, verbose_name="groupes") rooms = models.ManyToManyField(Room, verbose_name="salles") - begin = models.DateTimeField(verbose_name="début du cours") + begin = models.DateTimeField(verbose_name="début du cours", db_index=True) end = models.DateTimeField(verbose_name="fin du cours") def __str__(self): |