urls.py 1.68 KB
Newer Older
1 2
# standard library imports
from __future__ import absolute_import, print_function
3
# core django imports
Jason D Yeomans's avatar
Jason D Yeomans committed
4
from django.conf.urls import patterns, include, url
5
# imports from your apps
6 7
from .views import (DetailStudent, UpdateStudent, DetailStudentSettings,
                    DetailCurrentStudent, DetailCurrentStudentSettings, ListMajors,
8
                    DetailMajor, CreateConfirmation, DeleteConfirmation)
9
from .adapter import RemoveSocialConfirmationView
10

Jason D Yeomans's avatar
Jason D Yeomans committed
11 12

urlpatterns = patterns('',
Jason D Yeomans's avatar
Jason D Yeomans committed
13

14
    # social media confirmation
Jason D Yeomans's avatar
Jason D Yeomans committed
15
    url(r'', include('allauth.urls')),
16

17
    # majors pages
18
    url(r'^majors/$', ListMajors.as_view(), name='list_majors'),
Daniel W Bond's avatar
Daniel W Bond committed
19

20
    url(r'^majors/(?P<slug>[\w-]+)/(?P<major>[\w-]+)/$',
21
        DetailMajor.as_view(), name='detail_major'),
22

23
    # student profile pages
24
    url(r'^student/(?P<slug>[\w-]+)/$',
25
        DetailStudent.as_view(), name='detail_student'),
Daniel W Bond's avatar
Daniel W Bond committed
26

27 28 29 30 31
    #url(r'^student/$',
        #cache_page(60 * 2)(DetailCurrentStudent.as_view()),
        #name='detailCurrentStudent'),

    # student settings
Daniel W Bond's avatar
Daniel W Bond committed
32
    url(r'^student/(?P<slug>[\w-]+)/settings/$',
33
        UpdateStudent.as_view(), name='updateStudent'),
34

35 36 37 38
    url(r'^student/(?P<slug>[\w-]+)/settings/social/remove/$',
        RemoveSocialConfirmationView.as_view(),
        name='remove_social'),

39 40 41 42 43 44 45 46 47 48 49
    #url(r'^settings/$',
        #cache_page(4)(DetailCurrentStudentSettings.as_view()),
        #name='currentStudentSettings'),

    # student confirmation pages
    url(r'^student/(?P<student_slug>[\w-]+)/flag/$',
        CreateConfirmation.as_view(), name='createConfirmation'),

    # delete
    url(r'^student/(?P<student_slug>[\w-]+)/flag/(?P<slug>[\w-]+)/$',
        DeleteConfirmation.as_view(), name='deleteConfirmation'),
Jason D Yeomans's avatar
Jason D Yeomans committed
50
)