097de60c673ce4ef1af7e17829f58f48d7a61731
[redakcja.git] / apps / wiki / urls.py
1 # -*- coding: utf-8
2 from django.conf.urls.defaults import *
3 from django.views.generic.simple import redirect_to
4 from django.views.generic.list_detail import object_detail
5 from django.conf import settings
6 from wiki.models import Book
7
8
9 #PART = ur"""[ ĄĆĘŁŃÓŚŻŹąćęłńóśżź0-9\w_.-]+"""
10
11 urlpatterns = patterns('wiki.views',
12     url(r'^$', redirect_to, {'url': 'catalogue/'}),
13
14     url(r'^catalogue/$', 'document_list', name='wiki_document_list'),
15     #url(r'^catalogue/([^/]+)/$', 'document_list'),
16     #url(r'^catalogue/([^/]+)/([^/]+)/$', 'document_list'),
17     #url(r'^catalogue/([^/]+)/([^/]+)/([^/]+)$', 'document_list'),
18     url(r'^unassigned/$', 'unassigned', name='wiki_unassigned'),
19     url(r'^user/$', 'my', name='wiki_user'),
20     url(r'^user/(?P<username>[^/]+)/$', 'user', name='wiki_user'),
21     url(r'^users/$', 'users', name='wiki_users'),
22
23     url(r'^edit/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$',
24         'editor', name="wiki_editor"),
25
26     url(r'^readonly/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$',
27         'editor_readonly', name="wiki_editor_readonly"),
28
29     url(r'^upload/$',
30         'upload', name='wiki_upload'),
31
32     url(r'^create/(?P<slug>[^/]*)/',
33         'create_missing', name='wiki_create_missing'),
34     url(r'^create/',
35         'create_missing', name='wiki_create_missing'),
36
37     url(r'^gallery/(?P<directory>[^/]+)/$',
38         'gallery', name="wiki_gallery"),
39
40     url(r'^history/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$',
41         'history', name="wiki_history"),
42
43     url(r'^rev/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$',
44         'revision', name="wiki_revision"),
45
46     url(r'^text/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$',
47         'text', name="wiki_text"),
48
49     url(r'^revert/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$',
50         'revert', name='wiki_revert'),
51
52     url(r'^book/(?P<slug>[^/]+)/publish$', 'publish', name="wiki_publish"),
53     #url(r'^(?P<name>[^/]+)/publish/(?P<version>\d+)$', 'publish', name="wiki_publish"),
54
55     url(r'^diff/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$', 'diff', name="wiki_diff"),
56     url(r'^tag/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$', 'add_tag', name="wiki_add_tag"),
57     url(r'^pubmark/(?P<slug>[^/]+)/(?:(?P<chunk>[^/]+)/)?$', 'pubmark', name="wiki_pubmark"),
58
59     url(r'^book/(?P<slug>[^/]+)/$', 'book', name="wiki_book"),
60     url(r'^book/(?P<slug>[^/]+)/xml$', 'book_xml', name="wiki_book_xml"),
61     url(r'^book/(?P<slug>[^/]+)/txt$', 'book_txt', name="wiki_book_txt"),
62     url(r'^book/(?P<slug>[^/]+)/html$', 'book_html', name="wiki_book_html"),
63     #url(r'^book/(?P<slug>[^/]+)/epub$', 'book_epub', name="wiki_book_epub"),
64     #url(r'^book/(?P<slug>[^/]+)/pdf$', 'book_pdf', name="wiki_book_pdf"),
65     url(r'^chunk_add/(?P<slug>[^/]+)/(?P<chunk>[^/]+)/$',
66         'chunk_add', name="wiki_chunk_add"),
67     url(r'^chunk_edit/(?P<slug>[^/]+)/(?P<chunk>[^/]+)/$',
68         'chunk_edit', name="wiki_chunk_edit"),
69     url(r'^book_append/(?P<slug>[^/]+)/$',
70         'book_append', name="wiki_book_append"),
71     url(r'^book_edit/(?P<slug>[^/]+)/$',
72         'book_edit', name="wiki_book_edit"),
73
74 )