904ad447b8a32406a5874c2db53f0c775d2f56a6
[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 admin.autodiscover()
8
9 urlpatterns = patterns('',
10     # Auth
11     url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
12     url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
13
14     # Admin panel
15     (r'^admin/filebrowser/', include('filebrowser.urls')),
16     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
17     (r'^admin/', include(admin.site.urls)),
18
19     # Static files (should be served by Apache)
20     url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
21         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
22     url(r'^%s(?P<path>.+)$' % settings.ADMIN_MEDIA_PREFIX[1:], 'django.views.static.serve',
23         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
24     url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
25         {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
26
27     url(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/documents/'}),
28     url(r'^documents/', include('wiki.urls')),
29 )