diff options
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -8,7 +8,7 @@ from django.template import Context, loader from edt.forms import SubscribeForm from edt.models import Timetable, LastUpdate, Group, Subscription, Course -from edt.utils import get_current_or_next_week, get_week, group_courses +from edt.utils import get_current_week, get_week, group_courses import datetime @@ -16,7 +16,7 @@ def index(request): timetables = Timetable.objects.all() groups = Group.objects.filter(tp__isnull=False).order_by("name") - year, week = get_current_or_next_week() + 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") @@ -37,7 +37,7 @@ def index(request): def timetable(request, timetable_slug, group_slug, year=None, week=None): if year is None or week is None: - year, week = get_current_or_next_week() + year, week = get_current_week() start, end = get_week(int(year), int(week)) @@ -73,7 +73,7 @@ def subscribe(request, timetable_slug, group_slug, year, week): def confirm_subscription(request, token): subscription = Subscription.objects.filter(token=token).first() - year, week = get_current_or_next_week() + year, week = get_current_week() if subscription is not None and not subscription.active: subscription.active = True |