e9e5e893a47ecb2f6144d717f5800bd410dc39dd
[redakcja.git] / apps / catalogue / urls.py
1 # -*- coding: utf-8
2 from django.conf.urls.defaults import *
3 from django.views.generic.simple import redirect_to
4
5
6 urlpatterns = patterns('catalogue.views',
7     url(r'^$', redirect_to, {'url': 'catalogue/'}),
8
9     url(r'^catalogue/$', 'document_list', name='catalogue_document_list'),
10     url(r'^user/$', 'my', name='catalogue_user'),
11     url(r'^user/(?P<username>[^/]+)/$', 'user', name='catalogue_user'),
12     url(r'^users/$', 'users', name='catalogue_users'),
13
14     url(r'^upload/$',
15         'upload', name='catalogue_upload'),
16
17     url(r'^create/(?P<slug>[^/]*)/',
18         'create_missing', name='catalogue_create_missing'),
19     url(r'^create/',
20         'create_missing', name='catalogue_create_missing'),
21
22     url(r'^book/(?P<slug>[^/]+)/publish$', 'publish', name="catalogue_publish"),
23     #url(r'^(?P<name>[^/]+)/publish/(?P<version>\d+)$', 'publish', name="catalogue_publish"),
24
25     url(r'^book/(?P<slug>[^/]+)/$', 'book', name="catalogue_book"),
26     url(r'^book/(?P<slug>[^/]+)/xml$', 'book_xml', name="catalogue_book_xml"),
27     url(r'^book/(?P<slug>[^/]+)/txt$', 'book_txt', name="catalogue_book_txt"),
28     url(r'^book/(?P<slug>[^/]+)/html$', 'book_html', name="catalogue_book_html"),
29     #url(r'^book/(?P<slug>[^/]+)/epub$', 'book_epub', name="catalogue_book_epub"),
30     #url(r'^book/(?P<slug>[^/]+)/pdf$', 'book_pdf', name="catalogue_book_pdf"),
31     url(r'^chunk_add/(?P<slug>[^/]+)/(?P<chunk>[^/]+)/$',
32         'chunk_add', name="catalogue_chunk_add"),
33     url(r'^chunk_edit/(?P<slug>[^/]+)/(?P<chunk>[^/]+)/$',
34         'chunk_edit', name="catalogue_chunk_edit"),
35     url(r'^book_append/(?P<slug>[^/]+)/$',
36         'book_append', name="catalogue_book_append"),
37     url(r'^book_edit/(?P<slug>[^/]+)/$',
38         'book_edit', name="catalogue_book_edit"),
39
40 )