X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/40a38822c70cb40ccda6770fe81d74624ecaecd7..ab8ffbde2df33d9c699e029ba613d2b014ba44b8:/apps/api/urls.py diff --git a/apps/api/urls.py b/apps/api/urls.py index 8a1451909..a2e3197ef 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -19,6 +19,9 @@ ebook_list_resource = Resource(handler=handlers.EBooksHandler) #book_list_resource = Resource(handler=handlers.BooksHandler) book_resource = Resource(handler=handlers.BookDetailHandler) +collection_resource = Resource(handler=handlers.CollectionDetailHandler) +collection_list_resource = Resource(handler=handlers.CollectionsHandler) + tag_list_resource = Resource(handler=handlers.TagsHandler) tag_resource = Resource(handler=handlers.TagDetailHandler) @@ -48,6 +51,10 @@ urlpatterns = patterns( url(r'tag/(?P\d*?)/info\.html$', 'catalogue.views.tag_info'), + # books by collections + url(r'^collections/$', collection_list_resource, name="api_collections"), + url(r'^collections/(?P[^/]+)/$', collection_resource, name="api_collection"), + # objects details url(r'^books/(?P[a-z0-9-]+)/$', book_resource, name="api_book"), url(r'^(?P[a-z0-9-]+)/(?P[a-z0-9-]+)/$',