X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b9bf77dc8f2d4b1b64bd7a29730bec3e3f885a6e..f293bf6e6217d2277d11b65fdb63bc35badc8e68:/apps/api/urls.py?ds=sidebyside diff --git a/apps/api/urls.py b/apps/api/urls.py index b6fc7604e..60b20647c 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', @@ -63,4 +63,7 @@ urlpatterns = patterns( # tags by category url(r'^(?P[a-z0-9-]+)/$', tag_list_resource), + + # picture by slug + url(r'^pictures/$', picture_resource) )