X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b9bf77dc8f2d4b1b64bd7a29730bec3e3f885a6e..4b6fc6dc545a10955094bfaa9448ba070cfb33bf:/apps/api/urls.py?ds=sidebyside diff --git a/apps/api/urls.py b/apps/api/urls.py index b6fc7604e..8f7bed3fe 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -6,7 +6,6 @@ from piston.resource import Resource from api import handlers from catalogue.models import Book - auth = OAuthAuthentication(realm="Wolne Lektury") book_changes_resource = Resource(handler=handlers.BookChangesHandler) @@ -23,6 +22,7 @@ tag_resource = Resource(handler=handlers.TagDetailHandler) fragment_resource = Resource(handler=handlers.FragmentDetailHandler) fragment_list_resource = Resource(handler=handlers.FragmentsHandler) +picture_resource = Resource(handler=handlers.PictureHandler, authentication=auth) urlpatterns = patterns( 'piston.authentication', @@ -57,6 +57,8 @@ urlpatterns = patterns( url(r'^(?P(?:(?:[a-z0-9-]+/){2}){0,6})books/$', book_list_resource), url(r'^(?P(?:(?:[a-z0-9-]+/){2}){0,6})parent_books/$', book_list_resource, {"top_level": True}), + url(r'^pictures/$', picture_resource), + # fragments by book, tags, themes # this should be paged url(r'^(?P(?:(?:[a-z0-9-]+/){2}){1,6})fragments/$', fragment_list_resource),