aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'views.py')
-rw-r--r--views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/views.py b/views.py
index 92e6dc9..424e355 100644
--- a/views.py
+++ b/views.py
@@ -41,7 +41,7 @@ def timetable(request, timetable_slug, year, week, group_slug):
grouped_courses = group_courses(courses)
- return render(request, "timetable.html", {"timetable": timetable, "group": group, "courses": grouped_courses, "last_update": last_update.date, "year": year, "week": week})
+ return render(request, "timetable.html", {"timetable": timetable, "group": group, "courses": grouped_courses, "last_update": last_update.date, "year": year, "week": int(week)})
def subscribe(request, timetable_slug, year, week, group_slug):
group = get_object_or_404(Group, slug=group_slug)
@@ -52,7 +52,7 @@ def subscribe(request, timetable_slug, year, week, group_slug):
subscription = Subscription(email=request.POST["email"], group=group)
subscription.save()
- return redirect("timetable", timetable_slug=timetable_slug, year=year, week=week, group_slug=group_slug)
+ return redirect("timetable", timetable_slug=timetable_slug, year=year, week=int(week), group_slug=group_slug)
else:
form = SubscribeForm()