urls.py 1.33 KB
Newer Older
Daniel W Bond's avatar
Daniel W Bond committed
1
from django.conf.urls import patterns, include, url
2

3
from .views import HomepageView, ChartsView
Daniel W Bond's avatar
Daniel W Bond committed
4
from django.views.generic import TemplateView
Jean Michel Rouly's avatar
Jean Michel Rouly committed
5

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

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

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

Daniel W Bond's avatar
Daniel W Bond committed
14
urlpatterns = patterns('',
15
16

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

Daniel W Bond's avatar
Daniel W Bond committed
21
22
23
    # search
    url(r'^search/', include('haystack.urls'), name='search'),

24
    # site-wide pages
25
26
    url(r'^$', HomepageView.as_view(), name = 'homepage'),
    url(r'^charts/?$', ChartsView.as_view(), name = 'charts'),
27
28

    ### static pages ###
Daniel W Bond's avatar
Daniel W Bond committed
29
30
31
    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'),
32

Daniel W Bond's avatar
Daniel W Bond committed
33
    ### user authentication ###
Daniel W Bond's avatar
Daniel W Bond committed
34
35
36
    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
37
    #### admin pages ####
Daniel W Bond's avatar
Daniel W Bond committed
38
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
Jean Michel Rouly's avatar
Jean Michel Rouly committed
39
    url(r'^admin/', include(admin.site.urls)),
40

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