Commit 6b8c54a3 authored by Jason D Yeomans's avatar Jason D Yeomans
Browse files

fix admin access

parent 1fbd2106
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView
from django.contrib import admin
admin.autodiscover()
admin.site.login = login_required(admin.site.login)
handle404 = TemplateView.as_view(template_name="404.html")
handle500 = TemplateView.as_view(template_name="500.html")
......@@ -20,8 +22,11 @@ urlpatterns = patterns('',
url(r'^accounts/', include('accounts.urls')),
# login and logout
url(r'^login/$', 'cas.views.login', name='login'),
url(r'^logout/$', 'cas.views.logout', name='logout'),
#url(r'^login/', 'cas.views.login', name='login'),
#url(r'^logout/', 'cas.views.logout', name='logout'),
url(r'^login/$', 'django.contrib.auth.views.login', name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'),
# alternate interfaces
url(r'^api/', include('api.urls')),
......
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