diff options
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,7 +29,7 @@ def index(request): year, week = get_current_week() start, _ = get_week(year, week) - groups_weeks = Course.objects.get_weeks(begin__gte=start).values("groups__timetable", "groups__mention", "groups__subgroup", "groups__td", "groups__tp", "year", "week") + groups_weeks = Course.objects.get_weeks(begin__gte=start, active=True).values("groups__timetable", "groups__mention", "groups__subgroup", "groups__td", "groups__tp", "year", "week") for group in groups: for group_week in groups_weeks: @@ -55,7 +55,7 @@ def timetable(request, timetable_slug, group_slug, year=None, week=None): timetable = get_object_or_404(Timetable, slug=timetable_slug) group = get_object_or_404(Group, slug=group_slug, timetable=timetable) last_update = get_object_or_404(LastUpdate, timetable=timetable, week=week, year=year) - courses = Course.objects.get_courses_for_group(group, begin__gte=start, begin__lt=end) + courses = Course.objects.get_courses_for_group(group, begin__gte=start, begin__lt=end, active=True) grouped_courses = group_courses(courses) |