aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
authorAlban Gruin2018-04-25 09:35:18 +0200
committerAlban Gruin2018-04-25 09:35:18 +0200
commitfb3a3bc214b071083325a75a9546331150eaa8a5 (patch)
tree908c2e4d5d3e65324e22d2df554139f9fe58f64d /views.py
parent60e3b389d065746d61906f91327867bfd5ed582c (diff)
templates: abstraction des listes de groupes/salles/semaines
Diffstat (limited to 'views.py')
-rw-r--r--views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/views.py b/views.py
index 2411fe7..e45ece3 100644
--- a/views.py
+++ b/views.py
@@ -76,7 +76,7 @@ def group_list(request, year_slug, timetable_slug):
group.weeks.sort()
return render(request, "group_list.html",
- {"timetable": timetable, "groups": groups})
+ {"timetable": timetable, "elements": groups})
def groups_all(request, year_slug, timetable_slug):
@@ -199,7 +199,7 @@ def rooms(request):
RawSQL("date_trunc('week', edt_course.begin)",
[]), distinct=True))
- return render(request, "group_list.html", {"groups": rooms})
+ return render(request, "room_list.html", {"elements": rooms})
# Récupération des salles et de toutes les semaines où elles sont
# concernées.
@@ -232,7 +232,7 @@ def rooms(request):
rooms_weeks[-1].weeks.append(date)
# Rendu de la page.
- return render(request, "group_list.html", {"groups": rooms_weeks})
+ return render(request, "room_list.html", {"elements": rooms_weeks})
def room_weeks(request, room_slug):