コード例 #1
0
 def GET(self):
     user = accounts.get_current_user()
     user.update_loan_status()
     loans = borrow.get_loans(user)
     return render['account/borrow'](user, loans)
コード例 #2
0
 def get_loan_count(self):
     return len(borrow.get_loans(self))
コード例 #3
0
 def get_loans(self):
     return borrow.get_loans(self.user)
コード例 #4
0
ファイル: account.py プロジェクト: mikemccabe/openlibrary
 def GET(self):
     user = web.ctx.site.get_user()
     user.update_loan_status()
     loans = borrow.get_loans(user)
     return render['account/borrow'](user, loans)
コード例 #5
0
ファイル: account.py プロジェクト: RaceList/openlibrary
 def GET(self):
     user = accounts.get_current_user()
     user.update_loan_status()
     loans = borrow.get_loans(user)
     return render['account/borrow'](user, loans)
コード例 #6
0
ファイル: models.py プロジェクト: strogo/openlibrary
 def update_loan_status(self):
     """Update the status of this user's loans."""
     loans = borrow.get_loans(self)
     for resource_id in [loan['resource_id'] for loan in loans]:
         borrow.update_loan_status(resource_id)
コード例 #7
0
ファイル: models.py プロジェクト: hornc/openlibrary-1
 def get_loan_count(self):
     return len(borrow.get_loans(self))
コード例 #8
0
ファイル: account.py プロジェクト: lukasklein/openlibrary
 def get_loans(self):
     return borrow.get_loans(self.user)
コード例 #9
0
ファイル: account.py プロジェクト: kamdjouduplex/openlibrary
 def GET(self):
     user = web.ctx.site.get_user()
     user.update_loan_status()
     loans = borrow.get_loans(user)
     return render['account/borrow'](user, loans)
コード例 #10
0
ファイル: models.py プロジェクト: lileric456/openlibrary
 def get_loans(self):
     self.update_loan_status()
     return borrow.get_loans(self)
コード例 #11
0
 def update_loan_status(self):
     """Update the status of this user's loans."""
     loans = borrow.get_loans(self)
     for resource_id in [loan['resource_id'] for loan in loans]:
         borrow.update_loan_status(resource_id)
コード例 #12
0
ファイル: models.py プロジェクト: yzou/openlibrary
 def get_loans(self):
     self.update_loan_status()
     return borrow.get_loans(self)