diff --git a/symposion/schedule/urls.py b/symposion/schedule/urls.py index e00d61e0..9ddf1207 100644 --- a/symposion/schedule/urls.py +++ b/symposion/schedule/urls.py @@ -2,7 +2,7 @@ from django.conf.urls.defaults import url, patterns urlpatterns = patterns("symposion.schedule.views", - url(r"^$", "schedule_detail", name="schedule_detail"), + url(r"^$", "schedule_conference", name="schedule_conference"), url(r"^edit/$", "schedule_edit", name="schedule_edit"), url(r"^list/$", "schedule_list", name="schedule_list"), url(r"^presentations.csv$", "schedule_list_csv", name="schedule_list_csv"), diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index 347b6ce2..f88d01f4 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -25,6 +25,25 @@ def fetch_schedule(slug): return schedule +def schedule_conference(request): + + schedules = Schedule.objects.all() + + sections = [] + for schedule in schedules: + days_qs = Day.objects.filter(schedule=schedule) + days = [TimeTable(day) for day in days_qs] + sections.append({ + "schedule": schedule, + "days": days, + }) + + ctx = { + "sections": sections, + } + return render(request, "schedule/schedule_conference.html", ctx) + + def schedule_detail(request, slug=None): schedule = fetch_schedule(slug) diff --git a/symposion/templates/schedule/schedule_conference.html b/symposion/templates/schedule/schedule_conference.html new file mode 100644 index 00000000..fa3ca87b --- /dev/null +++ b/symposion/templates/schedule/schedule_conference.html @@ -0,0 +1,38 @@ +{% extends "site_base.html" %} + +{% load i18n %} +{% load bootstrap_tags %} +{% load boxes_tags %} +{% load cache %} + +{% block head_title %}Conference Schedule{% endblock %} + +{% block body_class %}full{% endblock %} + +{% block right %} +{% endblock %} + +{% block body_outer %} +