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