summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/urls.py3
-rw-r--r--settings.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/program/urls.py b/program/urls.py
index 8ec547d..3aa1245 100644
--- a/program/urls.py
+++ b/program/urls.py
@@ -1,5 +1,6 @@
from django.conf import settings
from django.conf.urls.defaults import *
+from django.views.decorators.cache import cache_page
from django.views.generic.list_detail import object_detail, object_list
from models import Host, Show, TimeSlot
@@ -25,7 +26,7 @@ urlpatterns = patterns('',
url(r'^today/?$', day_schedule),
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/?$', day_schedule),
url(r'^(?P<year>\d{4})/(?P<week>\d{1,2})/?$', week_schedule),
- url(r'^current_box/?$', current_show),
+ url(r'^current_box/?$', cache_page(current_show, 60)),
url(r'^hosts/?$', object_list, hosts_dict),
url(r'^hosts/(?P<object_id>\d+)/?$', object_detail, hosts_dict, name='host-detail'),
url(r'^tips/?$', recommendations),
diff --git a/settings.py b/settings.py
index 4cefed6..4a501aa 100644
--- a/settings.py
+++ b/settings.py
@@ -77,6 +77,8 @@ TINYMCE_DEFAULT_CONFIG = {
'theme_advanced_toolbar_location': 'top',
}
+CACHE_BACKEND = 'locmem://'
+
try:
from local_settings import *
except ImportError: