- fields = ['title', 'parent',
- 'xml', 'html', 'pdf', 'epub', 'txt',
+ fields = ['title', 'parent'] + Book.file_types + [
- def read(self, request, slug):
- """ Returns details of a book, identified by a slug. """
+ def read(self, request, book):
+ """ Returns details of a book, identified by a slug and lang. """
+ kwargs = Book.split_urlid(book)
+ if not kwargs:
+ return rc.NOT_FOUND
fields = ['book', 'anchor', 'text', 'url', 'themes']
@piwik_track
fields = ['book', 'anchor', 'text', 'url', 'themes']
@piwik_track
- def read(self, request, slug, anchor):
+ def read(self, request, book, anchor):
- all_fields = ('url', 'title', 'description',
+ all_fields = ['url', 'title', 'description',
'mp3', 'ogg', 'daisy',
'parent', 'parent_number',
'tags',
'license', 'license_description', 'source_name',
'technical_editors', 'editors',
'author', 'sort_key',
'mp3', 'ogg', 'daisy',
'parent', 'parent_number',
'tags',
'license', 'license_description', 'source_name',
'technical_editors', 'editors',
'author', 'sort_key',