Removed faulty debug
[redakcja.git] / platforma / 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     url(r'^$', 'wiki.views.document_list'),
11     url(r'^gallery/(?P<directory>[^/]+)$', 'wiki.views.document_gallery'),
12     url(r'^(?P<name>[^/]+)/history$', 'wiki.views.document_history'),
13     url(r'^(?P<name>[^/]+)/diff/(?P<revA>\d+)/(?P<revB>\d+)$', 'wiki.views.document_diff'),
14
15     # Auth
16     url(r'^accounts/login/$', 'django_cas.views.login', name = 'login'),
17     url(r'^accounts/logout/$', 'django_cas.views.logout', name = 'logout'),
18
19     # Admin panel
20     (r'^admin/filebrowser/', include('filebrowser.urls')),
21     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
22     url(r'^admin/(.*)', admin.site.root),
23
24     # Static files (should be served by Apache)
25     url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
26         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
27     url(r'^%s(?P<path>.+)$' % settings.ADMIN_MEDIA_PREFIX[1:], 'django.views.static.serve',
28         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
29     url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
30         {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
31
32     url(r'^(?P<name>[^/]+)$', 'wiki.views.document_detail'),
33 )