aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
authorAlban Gruin2017-11-27 16:27:50 +0100
committerAlban Gruin2017-11-27 16:27:50 +0100
commit5d4d7530e1aba199c2604b311b17bef253f0a008 (patch)
treef7be9cd05d3d98d6b50095815464735f4f0b46a9 /views.py
parentd0c69d3095d14f5509190d6b637cc0c018e53a19 (diff)
Remplacement des références aux champs timetable vers source
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 3179ec5..2bf596b 100644
--- a/views.py
+++ b/views.py
@@ -37,7 +37,7 @@ def mention_list(request, year_slug):
def group_list(request, year_slug, timetable_slug):
timetable = get_object_or_404(Timetable, year__slug=year_slug, slug=timetable_slug)
- groups = Group.objects.filter(timetable=timetable.source, hidden=False).order_by("name")
+ groups = Group.objects.filter(source=timetable.source, hidden=False).order_by("name")
start, _ = get_week(*get_current_week())
end = start + datetime.timedelta(weeks=4)
@@ -89,14 +89,14 @@ def timetable_common(request, obj, year=None, week=None, timetable=None):
def timetable(request, year_slug, timetable_slug, group_slug, year=None, week=None):
timetable = get_object_or_404(Timetable, year__slug=year_slug, slug=timetable_slug)
- group = get_object_or_404(Group, slug=group_slug, timetable=timetable.source)
+ group = get_object_or_404(Group, slug=group_slug, source=timetable.source)
return timetable_common(request, group, year, week, timetable)
def calendars(request, year_slug, timetable_slug, group_slug):
timetable = get_object_or_404(Timetable, year__slug=year_slug,
slug=timetable_slug)
- group = get_object_or_404(Group, timetable=timetable.source, slug=group_slug)
+ group = get_object_or_404(Group, source=timetable.source, slug=group_slug)
groups = Group.objects.get_parents(group).annotate(length=Length("subgroup")) \
.order_by("length")