From 8cc9603814961302299c7587cd32c6e587bf8524 Mon Sep 17 00:00:00 2001 From: Luke Hatcher Date: Thu, 20 Dec 2012 01:52:45 -0500 Subject: [PATCH] add caching to schedule templates --- symposion/templates/reviews/review_list.html | 3 +- .../templates/schedule/schedule_detail.html | 44 +++++++------------ .../templates/schedule/schedule_edit.html | 22 ---------- .../templates/schedule/schedule_list.html | 44 +++++++++++-------- 4 files changed, 43 insertions(+), 70 deletions(-) diff --git a/symposion/templates/reviews/review_list.html b/symposion/templates/reviews/review_list.html index 72592bc9..8da4cb68 100644 --- a/symposion/templates/reviews/review_list.html +++ b/symposion/templates/reviews/review_list.html @@ -1,5 +1,6 @@ {% extends "reviews/base.html" %} {% block body %} +

{{ section }}

{% include "reviews/_review_table.html" %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/symposion/templates/schedule/schedule_detail.html b/symposion/templates/schedule/schedule_detail.html index 2b9647ee..076c2209 100644 --- a/symposion/templates/schedule/schedule_detail.html +++ b/symposion/templates/schedule/schedule_detail.html @@ -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 %} - -{% endblock %} - {% block body_outer %}
-

Schedule

- +
+

{{ schedule.section }} Schedule

+ {% block breadcrumbs %}{% sitetree_breadcrumbs from "main" %}{% endblock %} +
+
+
{% box "schedule_top" %} - {% for timetable in days %} -

{{ timetable.day.date }}

- {% include "schedule/_grid.html" %} - {% endfor %} + {% cache 600 "schedule-table" schedule.section %} + {% for timetable in days %} +

{{ timetable.day.date }}

+ {% include "schedule/_grid.html" %} + {% endfor %} + {% endcache %} + + {% box "schedule_bottom" %}
{% endblock %} diff --git a/symposion/templates/schedule/schedule_edit.html b/symposion/templates/schedule/schedule_edit.html index 3be4428b..5de11af2 100644 --- a/symposion/templates/schedule/schedule_edit.html +++ b/symposion/templates/schedule/schedule_edit.html @@ -12,28 +12,6 @@ {% block extra_head %} - {% endblock %} {% block body_outer %} diff --git a/symposion/templates/schedule/schedule_list.html b/symposion/templates/schedule/schedule_list.html index 72bd0d95..d6c6348a 100644 --- a/symposion/templates/schedule/schedule_list.html +++ b/symposion/templates/schedule/schedule_list.html @@ -1,20 +1,22 @@ {% extends "site_base.html" %} {% load i18n %} +{% load cache %} +{% load sitetree %} {% block head_title %}Presentation Listing{% endblock %} {% block extra_head %} {% endblock %} +{% block breadcrumbs %}{% sitetree_breadcrumbs from "main" %}{% endblock %} + {% block body %} -

Accepted {{ schedule.section.name }}

- {% for presentation in presentations %} -
-
-

{{ presentation.title }}

-

{{ presentation.speaker }} in {{ presentation.proposal.track }}

- {{ presentation.description }} - {% if presentation.slot %} -

- {{ presentation.slot.day.date|date:"l" }} - {{ presentation.slot.start}}–{{ presentation.slot.end }} - in - {{ presentation.slot.rooms|join:", " }} -

- {% endif %} +

Accepted {{ schedule.section.name }}

+ {% cache 600 "schedule-list" schedule.section.name %} + {% for presentation in presentations %} +
+
+

{{ presentation.title }}

+

{{ presentation.speakers|join:", " }} in {{ presentation.proposal.category }}

+ {{ presentation.description }} + {% if presentation.slot %} +

+ {{ presentation.slot.day.date|date:"l" }} + {{ presentation.slot.start}}–{{ presentation.slot.end }} + in + {{ presentation.slot.rooms|join:", " }} +

+ {% endif %} +
-
- {% endfor %} + {% endfor %} + {% endcache %} {% endblock %}