X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/7e6d14043e3e2dce8e3fdcef0b0fc649680b07b3..5116918efc22e206f68fa19529f93c913f98930f:/apps/api/urls.py 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) )