'book_fragments', name='book_fragments'),
url(r'^okladka-ridero/(?P<slug>%s).png$' % SLUG, 'ridero_cover'),
+ url(r'^isbn/(?P<book_format>(pdf|epub|mobi|txt|html))/(?P<slug>%s)/' % SLUG, 'get_isbn'),
# Includes.
url(r'^b/(?P<pk>\d+)/mini\.(?P<lang>.+)\.html', 'book_mini', name='catalogue_book_mini'),
response = HttpResponse(content_type="image/png")
cover.save(response)
return response
+
+
+def get_isbn(request, book_format, slug):
+ book = Book.objects.get(slug=slug)
+ return HttpResponse(book.extra_info.get('isbn_%s' % book_format))