resize snippets
[wolnelektury.git] / src / api / urls.py
index 1c2e656..4452aa2 100644 (file)
@@ -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 = 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)
 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)),
 
     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'^$', 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"),
 
     # books by collections
     url(r'^collections/$', collection_list_resource, name="api_collections"),