def process(category, slug):
if category == 'book':
+ # FIXME: Unused?
try:
books.append(Book.objects.get(slug=slug))
except Book.DoesNotExist:
model = Book
fields = book_list_fields
+ # FIXME: Unused?
@classmethod
def genres(cls, book):
""" Returns all media for a book. """
are returned.
"""
if pk is not None:
+ # FIXME: Unused?
try:
return Book.objects.get(pk=pk)
except Book.DoesNotExist:
def read(self, request, category=None, pk=None):
""" Lists all tags in the category (eg. all themes). """
if pk is not None:
+ # FIXME: Unused?
try:
return Tag.objects.exclude(category='set').get(pk=pk)
except Book.DoesNotExist:
class UserShelfHandler(BookDetailHandler):
fields = book_list_fields + ['liked']
+ # FIXME: Unused?
def parse_bool(self, s):
if s in ('true', 'false'):
return s == 'true'