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)
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/(?P<model>book|fragment|tag)/(?P<pk>\d+)\.(?P<lang>.+)\.(?P<emitter_format>xml|json)$',
incl, name='api_include'),
# info boxes (used by mobile app)
- url(r'book/(?P<id>\d*?)/info\.html$', 'catalogue.views.book_info'),
- url(r'tag/(?P<id>\d*?)/info\.html$', 'catalogue.views.tag_info'),
+ url(r'book/(?P<book_id>\d*?)/info\.html$', 'catalogue.views.book_info'),
+ url(r'tag/(?P<tag_id>\d*?)/info\.html$', 'catalogue.views.tag_info'),
# books by collections
url(r'^collections/$', collection_list_resource, name="api_collections"),