X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e34cbdf5e06f7766f748440a875ddaed6b90461b..81f4a0e5709e2bf818244a07cbb715a54c96f3eb:/apps/api/urls.py diff --git a/apps/api/urls.py b/apps/api/urls.py index b6fc7604e..9bad68a12 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -5,7 +5,7 @@ from piston.resource import Resource from api import handlers from catalogue.models import Book - +from picture.models import Picture auth = OAuthAuthentication(realm="Wolne Lektury") @@ -23,6 +23,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) urlpatterns = patterns( 'piston.authentication', @@ -63,4 +64,7 @@ urlpatterns = patterns( # tags by category url(r'^(?P[a-z0-9-]+)/$', tag_list_resource), + + # picture by slug + url(r'^pictures/$', picture_resource) )