urls.py 961 Bytes
Newer Older
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
3 4

from django.contrib import admin
Daniel W Bond's avatar
Daniel W Bond committed
5

6 7
admin.autodiscover()

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

11
urlpatterns = patterns('',
12 13

    # project-level urls
Jason D Yeomans's avatar
Jason D Yeomans committed
14
    url(r'^$', TemplateView.as_view( template_name="index.html" ), name='index'),
15
    url(r'^about/$', TemplateView.as_view(template_name='about.html'), name='about'),
Daniel W Bond's avatar
Daniel W Bond committed
16
    url(r'^privacy/$', TemplateView.as_view(template_name='privacy.html'), name='privacy'),
Daniel W Bond's avatar
Daniel W Bond committed
17

18 19
    # app-level urls
    url(r'^housing/', include('housing.urls')),
Jason D Yeomans's avatar
Jason D Yeomans committed
20
    url(r'^accounts/', include('accounts.urls')),
21

Daniel W Bond's avatar
Daniel W Bond committed
22 23
    # login and logout
    url(r'^login/$', 'cas.views.login', name='login'),
24
    url(r'^logout/$', 'cas.views.logout', name='logout'),
Daniel W Bond's avatar
Daniel W Bond committed
25

26
    # alternate interfaces
27 28 29
    url(r'^api/', include('api.urls')),
    url(r'^admin/', include(admin.site.urls)),
)