aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'models.py')
-rw-r--r--models.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/models.py b/models.py
index 93d5e27..6e0774f 100644
--- a/models.py
+++ b/models.py
@@ -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):