Example #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)
Example #2
0
 def get_loan_count(self):
     return len(borrow.get_loans(self))
Example #3
0
 def get_loans(self):
     return borrow.get_loans(self.user)
Example #4
0
 def GET(self):
     user = web.ctx.site.get_user()
     user.update_loan_status()
     loans = borrow.get_loans(user)
     return render['account/borrow'](user, loans)
Example #5
0
 def GET(self):
     user = accounts.get_current_user()
     user.update_loan_status()
     loans = borrow.get_loans(user)
     return render['account/borrow'](user, loans)
Example #6
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)
Example #7
0
 def get_loan_count(self):
     return len(borrow.get_loans(self))
Example #8
0
 def get_loans(self):
     return borrow.get_loans(self.user)
Example #9
0
 def GET(self):
     user = web.ctx.site.get_user()
     user.update_loan_status()
     loans = borrow.get_loans(user)
     return render['account/borrow'](user, loans)
Example #10
0
 def get_loans(self):
     self.update_loan_status()
     return borrow.get_loans(self)
Example #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)
Example #12
0
 def get_loans(self):
     self.update_loan_status()
     return borrow.get_loans(self)