X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/eee35e00bf0d0eb3d2a9f08f72c7052962fecbf6..refs/heads/master:/src/archive/urls.py?ds=sidebyside diff --git a/src/archive/urls.py b/src/archive/urls.py index efaeeea..f8f2309 100644 --- a/src/archive/urls.py +++ b/src/archive/urls.py @@ -1,25 +1,24 @@ -from django.conf.urls import patterns, include, url +from django.urls import path from django.views.generic import RedirectView +from . import views -urlpatterns = patterns('', - url(r'^$', RedirectView.as_view(url='new/')), - - url(r'^new/$', 'archive.views.list_new', name="list_new"), - url(r'^new/(.+)/$', 'archive.views.file_new', name="file_new"), - url(r'^move_to_archive/(.+)/$', 'archive.views.move_to_archive', name="move_to_archive"), - - url(r'^unpublished/$', 'archive.views.list_unpublished', name="list_unpublished"), - url(r'^publishing/$', 'archive.views.list_publishing', name="list_publishing"), - url(r'^published/$', 'archive.views.list_published', name="list_published"), - url(r'^file/(\d+)/$', 'archive.views.file_managed', name="file"), - url(r'^publish/(\d+)/$', 'archive.views.publish', name="publish"), - url(r'^convert/(\d+)/$', 'archive.views.publish', {'publish': False}, name="convert"), - url(r'^download/(\d+)/$', 'archive.views.download', name="download"), - url(r'^download/(\d+)\.(mp3|ogg)$', 'archive.views.download', name="download"), - url(r'^cancel/(\d+)/$', 'archive.views.cancel_publishing', name="cancel_publishing"), - url(r'^remove_to_archive/(\d+)/$', 'archive.views.remove_to_archive', name="remove_to_archive"), - - url(r'^unmanaged/$', 'archive.views.list_unmanaged', name="list_unmanaged"), - url(r'^unmanaged/(.+)/$', 'archive.views.file_unmanaged', name="file_unmanaged"), - url(r'^move_to_new/(.+)/$', 'archive.views.move_to_new', name="move_to_new"), -) +urlpatterns = [ + path("", views.AudiobookList.as_view(), name="list_managed"), + path('new/', views.list_new, name="list_new"), + path('new//', views.file_new, name="file_new"), + path('move_to_archive//', views.move_to_archive, name="move_to_archive"), + path('publishing/', views.list_publishing, name="list_publishing"), + path('book//', views.BookView.as_view(), name="book"), + path('book/.json', views.book_json, name="book_json"), + path('book-youtube-volume//', views.book_youtube_volume, name="book_youtube_volume"), + path('file//', views.file_managed, name="file"), + path('publish//', views.publish, name="publish"), + path('convert//', views.publish, {'publish': False}, name="convert"), + path('download//', views.download, name="download"), + path('download/.', views.download, name="download"), + path('cancel//', views.cancel_publishing, name="cancel_publishing"), + path('remove_to_archive//', views.remove_to_archive, name="remove_to_archive"), + path('unmanaged/', views.list_unmanaged, name="list_unmanaged"), + path('unmanaged//', views.file_unmanaged, name="file_unmanaged"), + path('move_to_new//', views.move_to_new, name="move_to_new"), +]