Skip to content
Snippets Groups Projects
Commit da1012c3 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Pass week number into lessons tbale. Advances #12.

parent efc4d67d
No related branches found
No related tags found
No related merge requests found
......@@ -11,3 +11,7 @@ class LessonsTable(tables.Table):
lesson__teachers = tables.Column(accessor='lesson.teacher_names')
lesson__subject = tables.Column(accessor='lesson.subject')
room = tables.Column(accessor='room')
def __init__(self, week, *args, **kwargs):
self._week = week
super().__init__(*args, **kwargs)
......@@ -102,7 +102,7 @@ def lessons_day(request: HttpRequest, when: Optional[str] = None) -> HttpRespons
).all()
# Build table
lessons_table = LessonsTable(lesson_periods)
lessons_table = LessonsTable(week, lesson_periods)
RequestConfig(request).configure(lessons_table)
context['lessons_table'] = lessons_table
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment