urls.py 1.03 KB
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 5 6

from django.contrib import admin
admin.autodiscover()

Daniel W Bond's avatar
Daniel W Bond committed
7 8 9
# custom 404
# custom 500

10
urlpatterns = patterns('',
11 12

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

    # logins
    url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}, name='login'),
    url(r'logout/$', 'django.contrib.auth.views.logout', {'template_name': 'index.html'}, name='logout'),
21 22 23

    # app-level urls
    url(r'^housing/', include('housing.urls')),
Jason D Yeomans's avatar
Jason D Yeomans committed
24
    url(r'^accounts/', include('accounts.urls')),
25 26

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