urls.py 1.16 KB
Newer Older
Daniel W Bond's avatar
Daniel W Bond committed
1
from django.conf.urls import patterns, include, url
Daniel W Bond's avatar
Daniel W Bond committed
2
from django.views.generic import TemplateView
Jean Michel Rouly's avatar
Jean Michel Rouly committed
3

Jean Michel Rouly's avatar
Jean Michel Rouly committed
4
from django.contrib import admin
Daniel W Bond's avatar
Daniel W Bond committed
5

Jean Michel Rouly's avatar
Jean Michel Rouly committed
6
# Uncomment the next two lines to enable the admin:
Jean Michel Rouly's avatar
Jean Michel Rouly committed
7
admin.autodiscover()
Jean Michel Rouly's avatar
Jean Michel Rouly committed
8

Daniel W Bond's avatar
Daniel W Bond committed
9
10
handle404 = TemplateView.as_view(template_name="404.html")
handle500 = TemplateView.as_view(template_name="500.html")
11

Daniel W Bond's avatar
Daniel W Bond committed
12
urlpatterns = patterns('',
13
14

    # app-level urls
Daniel W Bond's avatar
Daniel W Bond committed
15
    url(r'^share/', include('trades.urls')),
Daniel W Bond's avatar
Daniel W Bond committed
16
    url(r'^student/', include('core.urls')),
Daniel W Bond's avatar
Daniel W Bond committed
17
    url(r'^lookouts/', include('lookouts.urls')),
18

Daniel W Bond's avatar
Daniel W Bond committed
19
    ### static pages ###
Daniel W Bond's avatar
Daniel W Bond committed
20
    url(r'^$', TemplateView.as_view(template_name='index.html'), name = 'homepage'),
Daniel W Bond's avatar
Daniel W Bond committed
21
22
23
    url(r'^about/?$', TemplateView.as_view(template_name='about.html'), name='about'),
    url(r'^privacy/?$', TemplateView.as_view(template_name='privacy.html'), name='privacy'),
    url(r'^privacy/opt-out/?$', 'core.views.privacy_opt_out', name='privacy_opt_out'),
24

Daniel W Bond's avatar
Daniel W Bond committed
25
    ### user authentication ###
Daniel W Bond's avatar
Daniel W Bond committed
26
27
28
    url(r'^login/$', 'cas.views.login', name='login'),
    url(r'^logout/$', 'cas.views.logout', name='logout'),

Daniel W Bond's avatar
Daniel W Bond committed
29
    #### admin pages ####
Daniel W Bond's avatar
Daniel W Bond committed
30
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
Jean Michel Rouly's avatar
Jean Michel Rouly committed
31
    url(r'^admin/', include(admin.site.urls)),
32

Jean Michel Rouly's avatar
Jean Michel Rouly committed
33
)