urls.py 1.01 KB
Newer Older
1
# core django imports
Jason D Yeomans's avatar
Jason D Yeomans committed
2
from django.conf.urls import patterns, include, url
3 4
# imports from your apps
from .views import DetailStudent, UpdateStudent, DetailStudentSettings,\
Daniel W Bond's avatar
Daniel W Bond committed
5
    DetailCurrentStudent, DetailCurrentStudentSettings, UpdateStudentMajor,\
6
    ListMajors, DetailMajor
7

Jason D Yeomans's avatar
Jason D Yeomans committed
8 9

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

Jason D Yeomans's avatar
Jason D Yeomans committed
11
    url(r'', include('allauth.urls')),
12

Daniel W Bond's avatar
Daniel W Bond committed
13 14
    url(r'^majors/$', ListMajors.as_view(), name='list_majors'),

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

18
    url(r'^student/(?P<slug>[\w-]+)/$',
19
        DetailStudent.as_view(), name='detail_student'),
Daniel W Bond's avatar
Daniel W Bond committed
20

21
    url(r'^student/$',
22
        DetailCurrentStudent.as_view(), name='detailCurrentStudent'),
23

24
    url(r'^student/(?P<slug>[\w-]+)/welcome/$',
25
        UpdateStudent.as_view(), name='updateStudent'),
26

27
    url(r'^(?P<slug>[\w-]+)/major/$',
28
        UpdateStudentMajor.as_view(), name='updateStudentMajor'),
29

30
    url(r'^settings/$',
31 32
        DetailCurrentStudentSettings.as_view(), name='currentStudentSettings'),

Jason D Yeomans's avatar
Jason D Yeomans committed
33
)