added day timetables to schedule_detail

This commit is contained in:
Brian Rosner 2012-09-20 19:42:03 -06:00
parent b14b20aaa0
commit 6a1e59812a

View file

@ -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)