Commit 295ca3e5 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added cas login urls

parent 4a48e25f
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from django.contrib import admin
from django.contrib import auth
from django.conf.urls import patterns, include, url
from website.forms import StyledSearchForm
from haystack.views import SearchView
......@@ -15,22 +12,22 @@ admin.autodiscover()
handle404 = TemplateView.as_view(template_name="404.html")
handle500 = TemplateView.as_view(template_name="500.html")
urlpatterns = patterns('website.views',
urlpatterns = patterns('',
#### USER PAGES ####
# home page
url(r'^$', 'index', name = 'homepage'),
url(r'^$', 'website.views.index', name = 'homepage'),
# user profile page
url(r'^u/(?P<username>\w+)/?$', 'profile', name = 'profile'),
url(r'^u/(?P<username>\w+)/?$', 'website.views.profile', name = 'profile'),
# create lookout
url(r'^u/(?P<username>\w+)/create-lookout/?$', 'create_lookout', name = 'create_lookout'),
url(r'^u/(?P<username>\w+)/create-lookout/?$', 'website.views.create_lookout', name = 'create_lookout'),
#### LISTING PAGES ####
# global new listings page
url(r'^listings/?$', 'all_listings', name = 'all_listings'),
url(r'^listings/?$', 'website.views.all_listings', name = 'all_listings'),
# create new listing
url(r'^listings/create/?$', 'create_listing', name = 'create_listing'),
url(r'^listings/create/?$', 'website.views.create_listing', name = 'create_listing'),
# book listing page
url(r'^listings/(?P<book_id>\d+)$', 'view_listing', name = 'view_listing'),
url(r'^listings/(?P<book_id>\d+)$', 'website.views.view_listing', name = 'view_listing'),
#### STATIC PAGES ####
# about page
......@@ -40,7 +37,7 @@ urlpatterns = patterns('website.views',
# privacy policy
url(r'^privacy/?$', TemplateView.as_view(template_name='privacy.html'), name='privacy'),
# privacy opt-out (for piwik)
url(r'^privacy/opt-out/?$', 'privacy_opt_out', name='privacy_opt_out'),
url(r'^privacy/opt-out/?$', 'website.views.privacy_opt_out', name='privacy_opt_out'),
#### SEARCH PAGES ####
# points to a SearchView Instance
......@@ -54,15 +51,11 @@ urlpatterns = patterns('website.views',
name = 'haystack_search',
),
url(r'^login/$', 'cas.views.login', name='login'),
url(r'^logout/$', 'cas.views.logout', name='logout'),
#### ADMIN PAGES ####
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
#url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
)
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'),
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment