Permalink
Browse files

add caching to schedule templates

  • Loading branch information...
1 parent c1ff154 commit 8cc9603814961302299c7587cd32c6e587bf8524 @lukeman lukeman committed Dec 20, 2012
@@ -1,5 +1,6 @@
{% extends "reviews/base.html" %}
{% block body %}
+ <h3>{{ section }}</h3>
{% include "reviews/_review_table.html" %}
-{% endblock %}
+{% endblock %}
@@ -3,6 +3,8 @@
{% load i18n %}
{% load bootstrap_tags %}
{% load boxes_tags %}
+{% load cache %}
+{% load sitetree %}
{% block head_title %}Conference Schedule{% endblock %}
@@ -11,39 +13,25 @@
{% block right %}
{% endblock %}
-{% block extra_head %}
- <style>
- .table td {
- font-size: 9pt;
- }
- .table th, td.slot {
- text-align: center;
- vertical-align: middle;
- }
- td.time {
- vertical-align: top;
- width: 50px;
- font-size: 8pt;
- padding-top: 0;
- }
- td.slot .title {
- font-weight: bold;
- line-height: 10pt;
- }
- </style>
-{% endblock %}
-
{% block body_outer %}
<div class="row">
<div class="span12">
- <h1>Schedule</h1>
-
+ <div class="page-head">
+ <h1>{{ schedule.section }} Schedule</h1>
+ {% block breadcrumbs %}{% sitetree_breadcrumbs from "main" %}{% endblock %}
+ </div>
+ </div>
+ <div class="span12">
{% box "schedule_top" %}
- {% for timetable in days %}
- <h2>{{ timetable.day.date }}</h2>
- {% include "schedule/_grid.html" %}
- {% endfor %}
+ {% cache 600 "schedule-table" schedule.section %}
+ {% for timetable in days %}
+ <h3>{{ timetable.day.date }}</h3>
+ {% include "schedule/_grid.html" %}
+ {% endfor %}
+ {% endcache %}
+
+ {% box "schedule_bottom" %}
</div>
</div>
{% endblock %}
@@ -12,28 +12,6 @@
{% block extra_head %}
<link rel="stylesheet" href="{{ STATIC_URL }}chosen/chosen.css" />
- <style>
- .table td {
- font-size: 9pt;
- }
- .table th, td.slot {
- text-align: center;
- vertical-align: middle;
- }
- td.time {
- vertical-align: top;
- width: 50px;
- font-size: 8pt;
- padding-top: 0;
- }
- td.slot .title {
- font-weight: bold;
- line-height: 10pt;
- }
- #id_presentation {
- width:400px;
- }
- </style>
{% endblock %}
{% block body_outer %}
@@ -1,20 +1,22 @@
{% extends "site_base.html" %}
{% load i18n %}
+{% load cache %}
+{% load sitetree %}
{% block head_title %}Presentation Listing{% endblock %}
{% block extra_head %}
<style>
.presentation {
-
+
}
.presentation h3 {
line-height: 1.1em;
font-weight: bold;
}
.presentation h4 {
-
+
}
.presentation p {
margin-bottom: 0.5em;
@@ -23,23 +25,27 @@
</style>
{% endblock %}
+{% block breadcrumbs %}{% sitetree_breadcrumbs from "main" %}{% endblock %}
+
{% block body %}
- <h1>Accepted {{ schedule.section.name }}</h1>
- {% for presentation in presentations %}
- <div class="row">
- <div class="span8 presentation well">
- <h3><a href="{% url schedule_presentation_detail presentation.pk %}">{{ presentation.title }}</a></h3>
- <h4>{{ presentation.speaker }} in {{ presentation.proposal.track }}</h4>
- {{ presentation.description }}
- {% if presentation.slot %}
- <h4>
- {{ presentation.slot.day.date|date:"l" }}
- {{ presentation.slot.start}}&ndash;{{ presentation.slot.end }}
- in
- {{ presentation.slot.rooms|join:", " }}
- </h4>
- {% endif %}
+ <h2>Accepted {{ schedule.section.name }}</h2>
+ {% cache 600 "schedule-list" schedule.section.name %}
+ {% for presentation in presentations %}
+ <div class="row">
+ <div class="span8 presentation well">
+ <h3><a href="{% url schedule_presentation_detail presentation.pk %}">{{ presentation.title }}</a></h3>
+ <h4>{{ presentation.speakers|join:", " }} in {{ presentation.proposal.category }}</h4>
+ {{ presentation.description }}
+ {% if presentation.slot %}
+ <h4>
+ {{ presentation.slot.day.date|date:"l" }}
+ {{ presentation.slot.start}}&ndash;{{ presentation.slot.end }}
+ in
+ {{ presentation.slot.rooms|join:", " }}
+ </h4>
+ {% endif %}
+ </div>
</div>
- </div>
- {% endfor %}
+ {% endfor %}
+ {% endcache %}
{% endblock %}

0 comments on commit 8cc9603

Please sign in to comment.