urls.py 1.37 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
5
6
# imports from your apps
from .views import DetailStudent, UpdateStudent, DetailStudentSettings,\
     DetailCurrentStudent, DetailCurrentStudentSettings, UpdateStudentMajor
from .models import Student
Jason D Yeomans's avatar
Jason D Yeomans committed
7
8

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

Jason D Yeomans's avatar
Jason D Yeomans committed
10
    url(r'', include('allauth.urls')),
11
12
13
14
15
16

    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
17
        name='detail_student'),
Daniel W Bond's avatar
Daniel W Bond committed
18

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

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

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

38
39
40
41
42
43
    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
44
)