Adds book class view and re-works pagination
This commit is contained in:
parent
cf2b9937c6
commit
56e3e98bc1
16 changed files with 197 additions and 439 deletions
|
@ -137,3 +137,13 @@ def handle_remote_webfinger(query):
|
|||
except KeyError:
|
||||
return None
|
||||
return user
|
||||
|
||||
|
||||
def get_edition(book_id):
|
||||
''' look up a book in the db and return an edition '''
|
||||
book = models.Book.objects.select_subclasses().get(id=book_id)
|
||||
if isinstance(book, models.Work):
|
||||
book = book.get_default_edition()
|
||||
return book
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue