X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8952b9530d943655e552ea660c47e850123c5105..b0fadf2591f3af957c1c8e0307d0bcef9e9f8538:/src/catalogue/urls.py diff --git a/src/catalogue/urls.py b/src/catalogue/urls.py index 27fddc2f0..f8eb6a4b2 100644 --- a/src/catalogue/urls.py +++ b/src/catalogue/urls.py @@ -8,12 +8,13 @@ from catalogue.feeds import AudiobookFeed from catalogue.models import Book from catalogue import views import picture.views +import search.views urlpatterns = [ path('obraz/strona/', picture.views.picture_page, name='picture_page'), # pictures - currently pictures are coupled with catalogue, hence the url is here - path('obraz/', picture.views.picture_list_thumb, name='picture_list_thumb'), + path('obraz/', picture.views.picture_list_thumb, name='picture_list_thumb'), # TODO: catalogue view path('obraz/.html', picture.views.picture_viewer, name='picture_viewer'), path('obraz//', picture.views.picture_detail, name='picture_detail'), @@ -21,8 +22,9 @@ urlpatterns = [ path('szukaj/', RedirectView.as_view( url='/szukaj/', query_string=True, permanent=True)), - path('', views.catalogue, name='catalogue'), + path('', views.catalogue, name='catalogue'), # TODO catalogue + # TODO: catalogue path('autor/', views.tag_catalogue, {'category': 'author'}, name='author_catalogue'), path('epoka/', views.tag_catalogue, {'category': 'epoch'}, name='epoch_catalogue'), path('gatunek/', views.tag_catalogue, {'category': 'genre'}, name='genre_catalogue'), @@ -35,14 +37,15 @@ urlpatterns = [ path('lektury/', views.literature, name='book_list'), path('lektury//', views.collection, name='collection'), path('audiobooki/', views.audiobooks, name='audiobook_list'), - path('daisy/', views.daisy_list, name='daisy_list'), - path('nowe/', ListView.as_view( - queryset=Book.objects.filter(parent=None).order_by('-created_at'), + path('daisy/', views.daisy_list, name='daisy_list'), # TODO: catalogue + path('jtags/', search.views.hint, {'param': 'q', 'mozhint': True}, name='jhint'), + path('nowe/', ListView.as_view( # TODO + queryset=Book.objects.filter(parent=None, findable=True).order_by('-created_at'), template_name='catalogue/recent_list.html'), name='recent_list'), - path('nowe/audiobooki/', ListView.as_view( + path('nowe/audiobooki/', ListView.as_view( # TODO 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'), - path('nowe/daisy/', ListView.as_view( + path('nowe/daisy/', ListView.as_view( # TODO 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'), @@ -53,11 +56,11 @@ 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'),