2 from django.conf.urls.defaults import *
3 from django.views.generic.simple import redirect_to
4 from django.conf import settings
7 PART = ur"""[ ĄĆĘŁŃÓŚŻŹąćęłńóśżź0-9\w_.-]+"""
9 urlpatterns = patterns('wiki.views',
10 url(r'^$', redirect_to, {'url': 'catalogue/'}),
12 url(r'^catalogue/$', 'document_list', name='wiki_document_list'),
13 url(r'^catalogue/([^/]+)/$', 'document_list'),
14 url(r'^catalogue/([^/]+)/([^/]+)/$', 'document_list'),
15 url(r'^catalogue/([^/]+)/([^/]+)/([^/]+)$', 'document_list'),
17 url(r'^(?P<name>%s)$' % PART,
18 'editor', name="wiki_editor"),
20 url(r'^(?P<name>[^/]+)/readonly$',
21 'editor_readonly', name="wiki_editor_readonly"),
24 'upload', name='wiki_upload'),
26 url(r'^create/(?P<name>[^/]+)',
27 'create_missing', name='wiki_create_missing'),
29 url(r'^(?P<directory>[^/]+)/gallery$',
30 'gallery', name="wiki_gallery"),
32 url(r'^(?P<name>[^/]+)/history$',
33 'history', name="wiki_history"),
35 url(r'^(?P<name>[^/]+)/text$',
36 'text', name="wiki_text"),
38 url(r'^(?P<name>[^/]+)/publish$', 'publish', name="wiki_publish"),
39 url(r'^(?P<name>[^/]+)/publish/(?P<version>\d+)$', 'publish', name="wiki_publish"),
41 url(r'^(?P<name>[^/]+)/diff$', 'diff', name="wiki_diff"),
42 url(r'^(?P<name>[^/]+)/tags$', 'add_tag', name="wiki_add_tag"),