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