fetchBorrowerKeysAndNames() is the first method referenced in the view logic. This method is found in the biglittle.domain.user.UserService class. Its purpose is to return a list of documents containing the values of the _id, userKey, and name fields. This list is subsequently used in the view template to provide a drop-down list from which the loan administrator can choose. Here is that method:
def fetchBorrowerKeysAndNames(self) :
keysAndNames = []
lookup = self.collection.find({'userType':'borrower'})
for borrower in lookup :
doc = {
'id' : borrower.getId(),
'key' : borrower.getKey(),
'name' : borrower.getFullName()
}
keysAndNames.append(doc)
return keysAndNames
Another method used during payment acceptance is fetchUserByBorrowerKey(), found in the same class. Its purpose is to return...