Changeset - 2a68242a5482
[Not reviewed]
0 2 1
Luke Hatcher - 11 years ago 2012-12-20 06:49:32
lukeman@gmail.com
add overall conference schedule
3 files changed with 58 insertions and 1 deletions:
0 comments (0 inline, 0 general)
symposion/schedule/urls.py
Show inline comments
...
 
@@ -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"),
symposion/schedule/views.py
Show inline comments
...
 
@@ -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)
 
    
symposion/templates/schedule/schedule_conference.html
Show inline comments
 
new file 100644
 
{% 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 %}
 
    <div class="row">
 
        <div class="span12">
 
            <div class="page-head">
 
                <h1>Conference Schedule</h1>
 
                {% block breadcrumbs %}{% endblock %}
 
            </div>
 
        </div>
 
        <div class="span12">
 
            {% box "schedule_top" %}
 
            
 
            {% for section in sections %}
 
                {% cache 600 "schedule-table" section.schedule.section %}
 
                    {% for timetable in section.days %}
 
                        <h3>{{ timetable.day.date }}</h3>
 
                        {% include "schedule/_grid.html" %}
 
                    {% endfor %}
 
                {% endcache %}
 
            {% endfor %}
 
            
 
            {% box "schedule_bottom" %}
 
        </div>
 
    </div>
 
{% endblock %}
0 comments (0 inline, 0 general)