diff options
author | Alban Gruin | 2017-02-03 10:13:25 +0100 |
---|---|---|
committer | Alban Gruin | 2017-02-03 10:13:25 +0100 |
commit | bfa5715f6deaa71ad51811bd2f59cdd330b860d9 (patch) | |
tree | 97e7fd37b44346aaec83f0df114e131aa8fa38dc /views.py | |
parent | 60cb0e3946b258deb62cbeb82a29337ac7fe2b4a (diff) |
Ajout d'un lien pour voir l'emploi du temps de la semaine actuelle
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -34,7 +34,10 @@ def index(request): return render(request, "index.html", {"timetables": timetables, "groups": groups}) -def timetable(request, group_slug, year, week): +def timetable(request, group_slug, year=None, week=None): + if year is None or week is None: + year, week, _ = timezone.now().isocalendar() + start, end = get_week(int(year), int(week)) group = get_object_or_404(Group, slug=group_slug) |