- fields = ['title', 'parent',
- 'xml', 'html', 'pdf', 'epub', 'txt',
+ fields = ['title', 'parent'] + Book.formats + [
- 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',
'parent', 'parent_number',
'tags',
'license', 'license_description', 'source_name',
'technical_editors', 'editors',
'author', 'sort_key',
'parent', 'parent_number',
'tags',
'license', 'license_description', 'source_name',
'technical_editors', 'editors',
'author', 'sort_key',