diff options
author | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2011-12-29 16:08:17 (GMT) |
---|---|---|
committer | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2011-12-29 16:08:17 (GMT) |
commit | 6b2a8fdb4a258c1273a6b49fef81d9aa3ccfd733 (patch) | |
tree | 69f8182f73f46896354ee879611a435cda7e5561 | |
parent | 92fc8037e32dae0e17e25a92a79c992645b27b3a (diff) |
enabled cache for current_how view
-rw-r--r-- | program/urls.py | 3 | ||||
-rw-r--r-- | settings.py | 2 |
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: |