X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/58554ad41d789d21c7477c01fd8c27ff1f590445..68f21622eb28525d849d34df21882714818c95ce:/src/catalogue/urls.py?ds=inline diff --git a/src/catalogue/urls.py b/src/catalogue/urls.py index 7f1eddbae..d02f4a41e 100644 --- a/src/catalogue/urls.py +++ b/src/catalogue/urls.py @@ -1,5 +1,5 @@ -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # from django.urls import path, re_path from django.db.models import Max @@ -30,22 +30,22 @@ urlpatterns = [ path('rodzaj/', views.tag_catalogue, {'category': 'kind'}, name='kind_catalogue'), path('motyw/', views.tag_catalogue, {'category': 'theme'}, name='theme_catalogue'), - path('galeria/', views.gallery, name='gallery'), + path('galeria/', views.GalleryView.as_view(), name='gallery'), path('kolekcje/', views.collections, name='catalogue_collections'), - path('lektury/', views.literature, name='book_list'), + path('lektury/', views.LiteratureView.as_view(), name='book_list'), path('lektury//', views.collection, name='collection'), - path('audiobooki/', views.audiobooks, name='audiobook_list'), + path('audiobooki/', views.AudiobooksView.as_view(), name='audiobook_list'), path('daisy/', views.daisy_list, name='daisy_list'), path('jtags/', search.views.hint, {'param': 'q', 'mozhint': True}, name='jhint'), path('nowe/', ListView.as_view( - queryset=Book.objects.filter(parent=None, findable=True).order_by('-created_at'), + queryset=Book.objects.filter(parent=None, findable=True).order_by('-created_at')[:100], template_name='catalogue/recent_list.html'), name='recent_list'), path('nowe/audiobooki/', ListView.as_view( - queryset=Book.objects.filter(media__type='ogg').annotate(m=Max('media__uploaded_at')).order_by('-m'), + queryset=Book.objects.filter(media__type='ogg').annotate(m=Max('media__uploaded_at')).order_by('-m')[:100], template_name='catalogue/recent_audiobooks_list.html'), name='recent_audiobooks_list'), path('nowe/daisy/', ListView.as_view( - queryset=Book.objects.filter(media__type='daisy').annotate(m=Max('media__uploaded_at')).order_by('-m'), + queryset=Book.objects.filter(media__type='daisy').annotate(m=Max('media__uploaded_at')).order_by('-m')[:100], template_name='catalogue/recent_daisy_list.html'), name='recent_daisy_list'), path('custompdf//', views.CustomPDFFormView(), name='custom_pdf_form'), @@ -55,15 +55,14 @@ urlpatterns = [ path('pobierz//.', views.embargo_link, name='embargo_link'), # zip - path('zip/pdf.zip', views.download_zip, {'format': 'pdf', 'slug': None}, 'download_zip_pdf'), - path('zip/epub.zip', views.download_zip, {'format': 'epub', 'slug': None}, 'download_zip_epub'), - path('zip/mobi.zip', views.download_zip, {'format': 'mobi', 'slug': None}, 'download_zip_mobi'), - path('zip/mp3/.zip', views.download_zip, {'format': 'mp3'}, 'download_zip_mp3'), - path('zip/ogg/.zip', views.download_zip, {'format': 'ogg'}, 'download_zip_ogg'), + path('zip/pdf.zip', views.download_zip, {'file_format': 'pdf', 'slug': None}, 'download_zip_pdf'), + path('zip/epub.zip', views.download_zip, {'file_format': 'epub', 'slug': None}, 'download_zip_epub'), + path('zip/mobi.zip', views.download_zip, {'file_format': 'mobi', 'slug': None}, 'download_zip_mobi'), + path('zip/mp3/.zip', views.download_zip, {'media_format': 'mp3'}, 'download_zip_mp3'), + path('zip/ogg/.zip', views.download_zip, {'media_format': 'ogg'}, 'download_zip_ogg'), # Public interface. Do not change this URLs. path('lektura/.html', views.book_text, name='book_text'), - path('lektura//audiobook/', views.player, name='book_player'), path('lektura//', views.book_detail, name='book_detail'), path('lektura//motyw//', views.book_fragments, name='book_fragments'),