aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
authorAlban Gruin2017-02-09 11:34:59 +0100
committerAlban Gruin2017-02-09 11:34:59 +0100
commit50f4e5d3277d611f3b9a662f436346e03f6e3996 (patch)
tree8daea60e78e1a0a252cf58b7fd2633355a48977e /views.py
parent1fd2062ca3fe15bf3442114ca45127e26d9566b7 (diff)
Plus de décalage artificiel à la semaine prochaine dans les vues
Diffstat (limited to 'views.py')
-rw-r--r--views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/views.py b/views.py
index b5d4cbf..f02061e 100644
--- a/views.py
+++ b/views.py
@@ -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