diff options
author | Alban Gruin | 2017-01-24 15:47:17 +0100 |
---|---|---|
committer | Alban Gruin | 2017-01-24 15:49:05 +0100 |
commit | 0b12914242f5c4def3cc86d44e370c6ad44920db (patch) | |
tree | 5615745b89d673dc271689b40ae485972514d9c4 /views.py | |
parent | 1038c182c050c9357d769341c3ef9d11f2d173f3 (diff) |
Correction de la regex pour trouver les semaines
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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() |