Add first alerts.
[redakcja.git] / src / documents / urls.py
1 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from django.conf.urls import url
5 from django.contrib.auth.decorators import permission_required
6 from django.views.generic import RedirectView
7 from .feeds import PublishTrackFeed
8 from . import views
9
10
11 urlpatterns = [
12     url(r'^$', RedirectView.as_view(url='catalogue/', permanent=False)),
13
14     url(r'^images/$', views.image_list, name='documents_image_list'),
15     url(r'^image/(?P<slug>[^/]+)/$', views.image, name="documents_image"),
16     url(r'^image/(?P<slug>[^/]+)/publish$', views.publish_image,
17             name="documents_publish_image"),
18
19     url(r'^catalogue/$', views.document_list, name='documents_document_list'),
20     url(r'^user/$', views.my, name='documents_user'),
21     url(r'^user/(?P<username>[^/]+)/$', views.user, name='documents_user'),
22     url(r'^users/$', views.users, name='documents_users'),
23     url(r'^activity/$', views.activity, name='documents_activity'),
24     url(r'^activity/(?P<isodate>\d{4}-\d{2}-\d{2})/$', 
25         views.activity, name='documents_activity'),
26
27     url(r'^upload/$',
28         views.upload, name='documents_upload'),
29
30     url(r'^create/(?P<slug>[^/]*)/',
31         views.create_missing, name='documents_create_missing'),
32     url(r'^create/',
33         views.create_missing, name='documents_create_missing'),
34
35     url(r'^book/(?P<slug>[^/]+)/publish$', views.publish, name="documents_publish"),
36
37     url(r'^book/(?P<slug>[^/]+)/$', views.book, name="documents_book"),
38     url(r'^book/(?P<slug>[^/]+)/gallery/$',
39             permission_required('documents.change_book')(views.GalleryView.as_view()),
40             name="documents_book_gallery"),
41     url(r'^book/(?P<slug>[^/]+)/xml$', views.book_xml, name="documents_book_xml"),
42     url(r'^book/dc/(?P<slug>[^/]+)/xml$', views.book_xml_dc, name="documents_book_xml_dc"),
43     url(r'^book/(?P<slug>[^/]+)/txt$', views.book_txt, name="documents_book_txt"),
44     url(r'^book/(?P<slug>[^/]+)/html$', views.book_html, name="documents_book_html"),
45     url(r'^book/(?P<slug>[^/]+)/epub$', views.book_epub, name="documents_book_epub"),
46     url(r'^book/(?P<slug>[^/]+)/mobi$', views.book_mobi, name="documents_book_mobi"),
47     url(r'^book/(?P<slug>[^/]+)/pdf$', views.book_pdf, name="documents_book_pdf"),
48     url(r'^book/(?P<slug>[^/]+)/pdf-mobile$', views.book_pdf, kwargs={'mobile': True}, name="documents_book_pdf_mobile"),
49
50     url(r'^chunk_add/(?P<slug>[^/]+)/(?P<chunk>[^/]+)/$',
51         views.chunk_add, name="documents_chunk_add"),
52     url(r'^chunk_edit/(?P<slug>[^/]+)/(?P<chunk>[^/]+)/$',
53         views.chunk_edit, name="documents_chunk_edit"),
54     url(r'^book_append/(?P<slug>[^/]+)/$',
55         views.book_append, name="documents_book_append"),
56     url(r'^chunk_mass_edit',
57         views.chunk_mass_edit, name='documents_chunk_mass_edit'),
58     url(r'^image_mass_edit',
59         views.image_mass_edit, name='documents_image_mass_edit'),
60
61     url(r'^track/(?P<slug>[^/]*)/$', PublishTrackFeed()),
62     url(r'^active/$', views.active_users_list, name='active_users_list'),
63
64     url(r'^mark-final/$', views.mark_final, name='mark_final'),
65     url(r'^mark-final-completed/$', views.mark_final_completed, name='mark_final_completed'),
66 ]