1 # -*- coding: utf-8 -*-
3 from django.conf.urls.defaults import *
4 from django.contrib import admin
5 from django.conf import settings
10 urlpatterns = patterns('',
12 #url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
13 #url(r'^accounts/logout/$', 'catalogue.views.logout_then_redirect', name='logout'),
15 url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
16 url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
19 (r'^admin/filebrowser/', include('filebrowser.urls')),
20 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
21 (r'^admin/', include(admin.site.urls)),
23 (r'^comments/', include('django.contrib.comments.urls')),
25 url(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/documents/'}),
26 url(r'^documents/', include('catalogue.urls')),
27 url(r'^apiclient/', include('apiclient.urls')),
28 url(r'^editor/', include('wiki.urls')),
29 url(r'^images/', include('wiki_img.urls')),
31 # Static files (should be served by Apache)
32 url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
33 {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
34 url(r'^%s(?P<path>.+)$' % settings.ADMIN_MEDIA_PREFIX[1:], 'django.views.static.serve',
35 {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
36 url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
37 {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
39 url(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/documents/'}),