add method for splitting a book
[redakcja.git] / redakcja / urls.py
1 # -*- coding: utf-8 -*-
2
3 from django.conf.urls.defaults import *
4 from django.contrib import admin
5 from django.conf import settings
6
7
8 admin.autodiscover()
9
10 urlpatterns = patterns('',
11     # Auth
12     #url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
13     #url(r'^accounts/logout/$', 'catalogue.views.logout_then_redirect', name='logout'),
14
15     url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
16     url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
17
18     # Admin panel
19     (r'^admin/filebrowser/', include('filebrowser.urls')),
20     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
21     (r'^admin/', include(admin.site.urls)),
22
23     (r'^comments/', include('django.contrib.comments.urls')),
24
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
30     # Static files (should be served by Apache)
31     url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
32         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
33     url(r'^%s(?P<path>.+)$' % settings.ADMIN_MEDIA_PREFIX[1:], 'django.views.static.serve',
34         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
35     url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
36         {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
37
38     url(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/documents/'}),
39
40 )