2 from django.conf.urls import url
3 from django.contrib.auth.decorators import login_required
4 from catalogue.views import GalleryView
6 from catalogue import views
9 # url(r'^$', RedirectView.as_view(url='catalogue/')),
11 url(r'^upcoming/$', views.upcoming, name='catalogue_upcoming'),
12 url(r'^finished/$', views.finished, name='catalogue_finished'),
14 url(r'^user/$', views.my, name='catalogue_user'),
15 url(r'^user/(?P<username>[^/]+)/$', views.user, name='catalogue_user'),
18 views.create_missing, name='catalogue_create_missing'),
19 url(r'^fork/(?P<pk>\d+)/',
20 views.fork, name='catalogue_fork'),
22 url(r'^doc/(?P<pk>\d+)/publish$', views.publish, name="catalogue_publish"),
23 url(r'^doc/(?P<pk>\d+)/unpublish$', views.unpublish, name="catalogue_unpublish"),
25 url(r'^(?P<pk>[^/]+)/schedule/$', views.book_schedule, name="catalogue_book_schedule"),
26 url(r'^(?P<pk>[^/]+)/owner/$', views.book_owner, name="catalogue_book_owner"),
27 url(r'^(?P<pk>[^/]+)/delete/$', views.book_delete, name="catalogue_book_delete"),
29 url(r'^(?P<pk>[^/]+)/attachments/$',
30 login_required()(GalleryView.as_view()),
31 name="catalogue_book_gallery"),
32 url(r'^(?P<pk>\d+)/$', views.book_html, name="catalogue_html"),
33 url(r'^(?P<pk>\d+)/preview/$', views.book_html, {'preview': True}, name="catalogue_preview"),
34 url(r'^(?P<pk>\d+)/rev(?P<rev_pk>\d+)/preview/$', views.book_html, {'preview': True}, name="catalogue_preview_rev"),
35 url(r'^(?P<pk>\d+)/rev(?P<rev_pk>\d+)/pdf/$', views.book_pdf, name="catalogue_pdf"),
36 url(r'^(?P<pk>\d+)/rev(?P<rev_pk>\d+)/epub/$', views.book_epub, name="catalogue_epub"),
37 url(r'^(?P<pk>\d+)/rev(?P<rev_pk>\d+)/mobi/$', views.book_mobi, name="catalogue_mobi"),