diff options
author | Alban Gruin | 2018-04-15 19:30:52 +0200 |
---|---|---|
committer | Alban Gruin | 2018-04-15 19:30:52 +0200 |
commit | ed1abe16a35d5ea5cea1106f97c6dc08bfd5265c (patch) | |
tree | 7ea3334fed81a46e5113d16c63991d072b364048 /views.py | |
parent | 305902a22e82cf68cd6b84e4f58ae42bdbb24b83 (diff) |
urls: utilisation de la nouvelle syntaxe path de Django
Mise à jour de la doc, nouvelles protections dans timetable_common()
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -86,7 +86,10 @@ def timetable_common(request, obj, year=None, week=None, timetable=None): elif (int(year), int(week)) < (current_year, current_week): is_old_timetable = True - start, end = get_week(year, week) + try: + start, end = get_week(year, week) + except ValueError: + raise Http404 courses = Course.objects.get_courses(obj, begin__gte=start, begin__lt=end) if not courses.exists() and provided_week: |