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'),
16 (r'^admin/filebrowser/', include('filebrowser.urls')),
17 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
18 (r'^admin/', include(admin.site.urls)),
20 (r'^comments/', include('django.contrib.comments.urls')),
22 url(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/documents/'}),
23 url(r'^documents/', include('catalogue.urls')),
24 url(r'^apiclient/', include('apiclient.urls')),
25 url(r'^editor/', include('wiki.urls')),
27 # Static files (should be served by Apache)
28 url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
29 {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
30 url(r'^%s(?P<path>.+)$' % settings.ADMIN_MEDIA_PREFIX[1:], 'django.views.static.serve',
31 {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
32 url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
33 {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
35 url(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/documents/'}),