diff options
author | Alban Gruin | 2017-09-30 17:01:32 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-30 17:01:32 +0200 |
commit | bf7c0b026284d7abe0390912253f07a65fa991d7 (patch) | |
tree | 065772b99e4deefe9e65d6bb8ef6e9ce6002cd97 | |
parent | 551c85e026d7241e71b9701d523a72c56dcdb14b (diff) |
On affiche que les groupes qui commencent par le nom de l’emploi du temps
-rw-r--r-- | views.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -57,7 +57,9 @@ def group_list_common(request, timetable, groups): def group_list(request, year_slug, timetable_slug): timetable = get_object_or_404(Timetable, year__slug=year_slug, slug=timetable_slug) - groups = Group.objects.get_relevant_groups(timetable=timetable).order_by("name") + groups = Group.objects.get_relevant_groups(timetable=timetable, name__startswith=timetable) \ + .order_by("name") + return group_list_common(request, timetable, groups) def timetable(request, year_slug, timetable_slug, group_slug, year=None, week=None): |