urls.py 1.32 KB
Newer Older
Jason D Yeomans's avatar
Jason D Yeomans committed
1
from django.conf.urls import patterns, include, url
2
from accounts.views import DetailStudent, UpdateStudent, DetailStudentSettings, DetailCurrentStudent, DetailCurrentStudentSettings, UpdateStudentMajor
3
from accounts.models import Student
Jason D Yeomans's avatar
Jason D Yeomans committed
4 5

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

Jason D Yeomans's avatar
Jason D Yeomans committed
7
    url(r'', include('allauth.urls')),
8 9 10 11 12 13

    url(r'^student/(?P<slug>[\w-]+)/$',
        DetailStudent.as_view(
            model=Student,
            context_object_name='student',
            template_name='detailStudent.html'),
Daniel W Bond's avatar
Daniel W Bond committed
14
        name='detail_student'),
Daniel W Bond's avatar
Daniel W Bond committed
15

16 17 18 19 20 21 22
    url(r'^student/$',
        DetailCurrentStudent.as_view(
            model=Student,
            context_object_name='student',
            template_name='detailStudent.html'),
        name='detailCurrentStudent'),

23 24
    url(r'^(?P<slug>[\w-]+)/welcome/$',
        UpdateStudent.as_view(
Daniel W Bond's avatar
Daniel W Bond committed
25
            model=Student,
26 27
            template_name="updateStudent.html"),
        name='updateStudent'),
28

29 30 31 32 33 34
    url(r'^(?P<slug>[\w-]+)/major/$',
        UpdateStudentMajor.as_view(
            model=Student,
            template_name="updateStudentMajor.html"),
        name='updateStudentMajor'),

35 36 37 38 39 40
    url(r'^settings/$',
        DetailCurrentStudentSettings.as_view(
            model=Student,
            context_object_name='student',
            template_name="studentSettings.html"),
        name='currentStudentSettings'),
Jason D Yeomans's avatar
Jason D Yeomans committed
41
)