added day timetables to schedule_detail
This commit is contained in:
parent
b14b20aaa0
commit
6a1e59812a
1 changed files with 4 additions and 0 deletions
|
@ -25,8 +25,12 @@ def fetch_schedule(slug):
|
||||||
def schedule_detail(request, slug=None):
|
def schedule_detail(request, slug=None):
|
||||||
schedule = fetch_schedule(slug)
|
schedule = fetch_schedule(slug)
|
||||||
|
|
||||||
|
days_qs = Day.objects.filter(schedule=schedule)
|
||||||
|
days = [TimeTable(day) for day in days_qs]
|
||||||
|
|
||||||
ctx = {
|
ctx = {
|
||||||
"schedule": schedule,
|
"schedule": schedule,
|
||||||
|
"days": days,
|
||||||
}
|
}
|
||||||
return render(request, "schedule/schedule_detail.html", ctx)
|
return render(request, "schedule/schedule_detail.html", ctx)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue