X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..ccead8bf96df0005e75ea60de74b51d37b92d844:/src/api/urls.py?ds=sidebyside diff --git a/src/api/urls.py b/src/api/urls.py index 1c2e656d1..4452aa2ae 100644 --- a/src/api/urls.py +++ b/src/api/urls.py @@ -15,7 +15,7 @@ auth = OAuthAuthentication(realm="Wolne Lektury") book_list_resource = CsrfExemptResource(handler=handlers.BooksHandler, authentication=auth) ebook_list_resource = Resource(handler=handlers.EBooksHandler) -#book_list_resource = Resource(handler=handlers.BooksHandler) +# book_list_resource = Resource(handler=handlers.BooksHandler) book_resource = Resource(handler=handlers.BookDetailHandler) collection_resource = Resource(handler=handlers.CollectionDetailHandler) @@ -51,14 +51,15 @@ urlpatterns = patterns( url(r'^oauth/authorize/$', 'oauth_user_auth'), url(r'^oauth/access_token/$', csrf_exempt(oauth_access_token)), -) + patterns('', +) + patterns( + '', url(r'^$', TemplateView.as_view(template_name='api/main.html'), name='api'), url(r'^include/(?Pbook|fragment|tag)/(?P\d+)\.(?P.+)\.(?Pxml|json)$', incl, name='api_include'), # info boxes (used by mobile app) - url(r'book/(?P\d*?)/info\.html$', 'catalogue.views.book_info'), - url(r'tag/(?P\d*?)/info\.html$', 'catalogue.views.tag_info'), + url(r'book/(?P\d*?)/info\.html$', 'catalogue.views.book_info'), + url(r'tag/(?P\d*?)/info\.html$', 'catalogue.views.tag_info'), # books by collections url(r'^collections/$', collection_list_resource, name="api_collections"),