diff options
author | Alban Gruin | 2017-02-05 13:38:49 +0100 |
---|---|---|
committer | Alban Gruin | 2017-02-05 13:38:49 +0100 |
commit | 49eca350c06d9c3e2c45a1215e2d98acee0535c1 (patch) | |
tree | 474c352719bef51ed7712276b77a9343181acfa0 /views.py | |
parent | fd3153f3fcf39eb012fa2e6dd4bcb4c45d97aeea (diff) |
Correction de la semaine récupérée automatiquement dans la vue de l'emploi du temps
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -36,7 +36,9 @@ def index(request): def timetable(request, group_slug, year=None, week=None): if year is None or week is None: - year, week, _ = timezone.now().isocalendar() + year, week, day = timezone.now().isocalendar() + if day >= 6: + year, week, _ = (timezone.now() + datetime.timedelta(weeks=1)).isocalendar() start, end = get_week(int(year), int(week)) |