Commit 11abcd45 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

finnessed, added some cacheing

parent 4a6e3e06
......@@ -6,7 +6,7 @@ from .views import DetailStudent, StudentRatings
urlpatterns = patterns('',
url(r'^(?P<slug>[\w-]+)/$',
DetailStudent.as_view(), name='profile'),
cache_page(60 * 5)(DetailStudent.as_view()), name='profile'),
url(r'^(?P<slug>[\w-]+)/ratings/$',
cache_page(60 * 5)(StudentRatings.as_view()), name='ratings'),
......
# core django imports
from django.conf.urls import patterns, url
from django.views.decorators.cache import cache_page
# imports from your apps
from .views import DetailLookout, CreateLookout, DeleteLookout
......@@ -9,7 +10,7 @@ urlpatterns = patterns('',
CreateLookout.as_view(), name='create_lookout'),
url(r'^(?P<slug>[\w-]+)/$',
DetailLookout.as_view(), name='detail_lookout'),
cache_page(60 * 5)(DetailLookout.as_view()), name='detail_lookout'),
url(r'^(?P<slug>[\w-]+)/delete/$',
DeleteLookout.as_view(), name='delete_lookout'),
......
......@@ -25,8 +25,10 @@ urlpatterns = patterns('',
url(r'^search/', include('haystack.urls'), name='search'),
# site-wide pages
# this page is weird for cacheing... no special url, but different content
# for each user
url(r'^$', HomepageView.as_view(), name='homepage'),
url(r'^charts/?$', cache_page(60 * 15)(ChartsView.as_view()), name='charts'),
url(r'^charts/?$', cache_page(60 * 10)(ChartsView.as_view()), name='charts'),
# static pages
url(r'^about/?$', TemplateView.as_view(template_name='about.html'),
......
......@@ -22,7 +22,7 @@ urlpatterns = patterns('',
EditBid.as_view(), name='edit_bid'),
url(r'^listing/(?P<slug>[\w-]+)/flag/$',
CreateFlag.as_view(), name='create_flag'),
cache_page(60 * 5)(CreateFlag.as_view()), name='create_flag'),
url(r'^listing/(?P<listing_slug>[\w-]+)/flag/(?P<slug>[\w-]+)/remove/$',
DeleteFlag.as_view(), name='delete_flag'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment