urls.py 2.55 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
from django.views.decorators.cache import cache_page
6
# imports from your apps
7 8 9 10
from .views import (DetailStudent, UpdateStudent, DetailStudentSettings,
                    DetailCurrentStudent, DetailCurrentStudentSettings, ListMajors,
                    DetailMajor, WelcomeName, WelcomePrivacy, WelcomeMajor,
                    WelcomeSocial, CreateConfirmation, DeleteConfirmation)
11
from .adapter import RemoveSocialConfirmationView
12

Jason D Yeomans's avatar
Jason D Yeomans committed
13 14

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

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

19
    # majors pages
20 21 22
    url(r'^majors/$',
        cache_page(60 * 15)(ListMajors.as_view()),
        name='list_majors'),
Daniel W Bond's avatar
Daniel W Bond committed
23

24 25
    url(r'^majors/(?P<slug>[\w-]+)/(?P<major>[\w-]+)/$',
        cache_page(60 * 2)(DetailMajor.as_view()),
26 27
        name='detail_major'),

28
    # student profile pages
29
    url(r'^student/(?P<slug>[\w-]+)/$',
30
        cache_page(4)(DetailStudent.as_view()),
31
        name='detail_student'),
Daniel W Bond's avatar
Daniel W Bond committed
32

33 34 35 36 37
    #url(r'^student/$',
        #cache_page(60 * 2)(DetailCurrentStudent.as_view()),
        #name='detailCurrentStudent'),

    # student settings
Daniel W Bond's avatar
Daniel W Bond committed
38 39
    url(r'^student/(?P<slug>[\w-]+)/settings/$',
        cache_page(4)(UpdateStudent.as_view()),
40
        name='updateStudent'),
41

42 43 44 45
    url(r'^student/(?P<slug>[\w-]+)/settings/social/remove/$',
        RemoveSocialConfirmationView.as_view(),
        name='remove_social'),

46 47 48 49 50 51 52 53 54 55 56
    #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'),
57 58 59

    # first welcome page
    # let's verify your name and optionally select a gender
60
    url(r'^welcome/(?P<slug>[\w-]+)/1/$',
61 62 63 64
        WelcomeName.as_view(), name='welcomeName'),

    # second welcome page
    # let's set your room and privacy
65
    url(r'^welcome/(?P<slug>[\w-]+)/2/$',
66 67 68 69
        WelcomePrivacy.as_view(), name='welcomePrivacy'),

    # third welcome page
    # let's verify your major
70
    url(r'^welcome/(?P<slug>[\w-]+)/3/$',
71 72 73 74
        WelcomeMajor.as_view(), name='welcomeMajor'),

    # fourth welcome page
    # set your social media links
75
    url(r'^welcome/(?P<slug>[\w-]+)/4/$',
76 77
        WelcomeSocial.as_view(), name='welcomeSocial'),

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