X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/274de65ca44c680c6c555c599ec32428c79db356..90e4a87f6ebffca42088cb952281c40555d2c520:/src/catalogue/urls.py diff --git a/src/catalogue/urls.py b/src/catalogue/urls.py index 0b33ce96c..a4627e25e 100644 --- a/src/catalogue/urls.py +++ b/src/catalogue/urls.py @@ -12,7 +12,8 @@ from catalogue.models import Book SLUG = r'[a-z0-9-]*' -urlpatterns = patterns('picture.views', +urlpatterns = patterns( + 'picture.views', # pictures - currently pictures are coupled with catalogue, hence the url is here url(r'^obraz/$', 'picture_list_thumb', name='picture_list_thumb'), url(r'^obraz/(?P%s).html$' % SLUG, 'picture_viewer', name='picture_viewer'), @@ -23,13 +24,15 @@ urlpatterns = patterns('picture.views', url(r'^pa/(?P\d+)/short\.(?P.+)\.html', 'picturearea_short', name='picture_area_short'), ) -urlpatterns += patterns('', +urlpatterns += patterns( + '', # old search page - redirected url(r'^szukaj/$', RedirectView.as_view( url='/szukaj/', query_string=True, permanent=True)), ) -urlpatterns += patterns('catalogue.views', +urlpatterns += patterns( + 'catalogue.views', url(r'^$', 'catalogue', name='catalogue'), url(r'^autor/$', 'tag_catalogue', {'category': 'author'}, name='author_catalogue'), @@ -52,10 +55,10 @@ urlpatterns += patterns('catalogue.views', template_name='catalogue/recent_list.html'), name='recent_list'), url(r'^nowe/audiobooki/$', ListView.as_view( queryset=Book.objects.filter(media__type='ogg').annotate(m=Max('media__uploaded_at')).order_by('-m'), - template_name='catalogue/recent_audiobooks_list.html'), name='recent_audiobooks_list'), + template_name='catalogue/recent_audiobooks_list.html'), name='recent_audiobooks_list'), url(r'^nowe/daisy/$', ListView.as_view( queryset=Book.objects.filter(media__type='daisy').annotate(m=Max('media__uploaded_at')).order_by('-m'), - template_name='catalogue/recent_daisy_list.html'), name='recent_daisy_list'), + template_name='catalogue/recent_daisy_list.html'), name='recent_daisy_list'), url(r'^custompdf/(?P%s)/$' % SLUG, CustomPDFFormView(), name='custom_pdf_form'), @@ -78,7 +81,8 @@ urlpatterns += patterns('catalogue.views', # Includes. url(r'^b/(?P\d+)/mini\.(?P.+)\.html', 'book_mini', name='catalogue_book_mini'), - url(r'^b/(?P\d+)/mini_nolink\.(?P.+)\.html', 'book_mini', {'with_link': False}, name='catalogue_book_mini_nolink'), + url(r'^b/(?P\d+)/mini_nolink\.(?P.+)\.html', 'book_mini', {'with_link': False}, + name='catalogue_book_mini_nolink'), url(r'^b/(?P\d+)/short\.(?P.+)\.html', 'book_short', name='catalogue_book_short'), url(r'^b/(?P\d+)/wide\.(?P.+)\.html', 'book_wide', name='catalogue_book_wide'), url(r'^f/(?P\d+)/promo\.(?P.+)\.html', 'fragment_promo', name='catalogue_fragment_promo'), @@ -87,6 +91,7 @@ urlpatterns += patterns('catalogue.views', url(r'^c/(?P.+)/box\.(?P.+)\.html', 'collection_box', name='catalogue_collection_box'), # This should be the last pattern. - url(r'^galeria/(?P[a-zA-Z0-9-/]*)/$', 'tagged_object_list', {'gallery': True}, name='tagged_object_list_gallery'), + url(r'^galeria/(?P[a-zA-Z0-9-/]*)/$', 'tagged_object_list', {'gallery': True}, + name='tagged_object_list_gallery'), url(r'^(?P[a-zA-Z0-9-/]*)/$', 'tagged_object_list', name='tagged_object_list'), )