From: Radek Czajka Date: Mon, 12 Sep 2011 04:06:05 +0000 (+0200) Subject: media in api fix X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/6bea6e8c1db99c6ed22cdc010ec2552fd473a649?ds=sidebyside;hp=38b4defd76b7ed4fedcd81631ec6a4351b469cdc media in api fix --- diff --git a/apps/api/handlers.py b/apps/api/handlers.py index bd44e57a8..508659e75 100644 --- a/apps/api/handlers.py +++ b/apps/api/handlers.py @@ -147,6 +147,12 @@ class BooksHandler(BaseHandler): else: return rc.NOT_FOUND + @classmethod + def media(self, book): + """ Returns all media for a book. """ + + return book.media.all() + # add categorized tags fields for Book def _tags_getter(category):