urls.py 1.28 KB
Newer Older
Daniel Warren Bond's avatar
Daniel Warren Bond committed
1
2
3
4
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()

Daniel W Bond's avatar
Daniel W Bond committed
5
6
from django.contrib.auth.views import login, logout
from advisor.views import index, about, privacy
7
8
#, login?

Daniel W Bond's avatar
Daniel W Bond committed
9
urlpatterns = patterns('',
Daniel W Bond's avatar
urls    
Daniel W Bond committed
10
11
12
13
14
15
16
17
18
    # URL Schema:
    # /                - homepage
    # /about           - about page
    # /course/XX       - course page
    # /user/XX         - student page
    # /user/XX/create  - student's create traj. page
    # /user/XX/compare - student's compare tool
    # /admin           - administrator portal

Daniel W Bond's avatar
Daniel W Bond committed
19
    # homepage
Daniel W Bond's avatar
Daniel W Bond committed
20
    url(r'^$', index, name = 'homepage'),
21

Daniel W Bond's avatar
urls    
Daniel W Bond committed
22
    # about page
Daniel W Bond's avatar
Daniel W Bond committed
23
    url(r'^about/$', about, name = 'about'),
Daniel W Bond's avatar
Daniel W Bond committed
24

Daniel W Bond's avatar
Daniel W Bond committed
25
    # privacy page
Daniel W Bond's avatar
Daniel W Bond committed
26
27
28
29
    url(r'^privacy/$', privacy, name = 'privacy'),

    # log in
    url(r'^login/$', login, name = 'login'),
Daniel W Bond's avatar
Daniel W Bond committed
30

31
    # admin pages
Daniel Warren Bond's avatar
Daniel Warren Bond committed
32
    url(r'^admin/', include(admin.site.urls)),
Daniel W Bond's avatar
Daniel W Bond committed
33
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
34

Daniel W Bond's avatar
Daniel W Bond committed
35
36
    # App sub-urls
    url(r'^trajectory/', include('trajectories.urls')),
Daniel W Bond's avatar
Daniel W Bond committed
37
38
    url(r'^analysis/', include('analysis.urls')),
)
Daniel W Bond's avatar
Daniel W Bond committed
39

40
41
42
43
44
45
urlpatterns += patterns('django.contrib.auth.views',
    # auth pages
    url(r'^login$', 'login', {'template_name': 'login.html'},
        name='website_login'),
    url(r'^logout$', 'logout', {'next_page': '/'}, name='website_logout'),
)