urls.py 1.19 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()

5
6
7
8
9
10
from django.contrib.auth.views import login, logout

from advisor.views import about, index
#, login?

urlpatterns = patterns('',
Daniel Warren Bond's avatar
Daniel Warren Bond committed
11
12
13
14
    # Examples:
    # url(r'^$', 'advisor.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

Daniel W Bond's avatar
urls    
Daniel W Bond committed
15
16
17
18
19
20
21
22
23
    # 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
24
25
26
    # homepage
    url(r'^$', 'index', name = 'homepage'),

27
28
29
    # log in
    url(r'^login/$', 'login', name = 'login'),

Daniel W Bond's avatar
urls    
Daniel W Bond committed
30
31
    # about page
    url(r'^about/$', 'about', name = 'about'),
Daniel W Bond's avatar
Daniel W Bond committed
32

33
    # admin pages
Daniel Warren Bond's avatar
Daniel Warren Bond committed
34
    url(r'^admin/', include(admin.site.urls)),
Daniel W Bond's avatar
Daniel W Bond committed
35
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
Daniel Warren Bond's avatar
Daniel Warren Bond committed
36
)
37
38
39
40
41
42
43

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'),
)