diff options
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4,6 +4,8 @@ from django.db.models.expressions import RawSQL from django.db.models.functions import Extract, ExtractYear from django.utils.text import slugify +from .db import GroupedManager + import hashlib import os @@ -111,7 +113,7 @@ class Room(models.Model): verbose_name_plural = "salles" -class CourseManager(models.Manager): +class CourseManager(GroupedManager): def __get_weeks(self, qs): extractYear = ExtractYear("begin") @@ -130,6 +132,7 @@ class CourseManager(models.Manager): qs = self.get_courses_for_group(group, **filters) return self.__get_weeks(qs) + class Course(models.Model): objects = CourseManager() |