コード例 #1
0
 def get_current_and_available_loans(self):
     current_loans = borrow.get_edition_loans(self)
     current_and_available_loans = (
         current_loans,
         self._get_available_loans(current_loans),
     )
     return current_and_available_loans
コード例 #2
0
ファイル: models.py プロジェクト: user404d/openlibrary
 def get_current_loans(self):
     return borrow.get_edition_loans(self)
コード例 #3
0
ファイル: waitinglist.py プロジェクト: alfaniel/openlibrary
def _is_loaned_out(book_key):
    from openlibrary.plugins.upstream import borrow
    book = web.ctx.site.get(book_key)
    return borrow.get_edition_loans(book) != []