urls.py 525 Bytes
Newer Older
1
# core django imports
Daniel W Bond's avatar
Daniel W Bond committed
2
from django.conf.urls import patterns, url
3
from django.views.decorators.cache import cache_page
4
# imports from your apps
5
from .views import DetailStudent, StudentRatings, UpdateStudent
Daniel W Bond's avatar
Daniel W Bond committed
6
7

urlpatterns = patterns('',
8
9
10
    url(r'^name-change/$',
        UpdateStudent.as_view(), name='name_change'),

11
    url(r'^(?P<slug>[\w-]+)/$',
12
        cache_page(12)(DetailStudent.as_view()), name='profile'),
Daniel W Bond's avatar
Daniel W Bond committed
13
14

    url(r'^(?P<slug>[\w-]+)/ratings/$',
15
        cache_page(12)(StudentRatings.as_view()), name='ratings'),
Daniel W Bond's avatar
Daniel W Bond committed
16
)