diff options
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) |