Beispiel #1
0
	def lend(self, borrowerID, date = None):
		import datetime
		borrower = UserAccount.getuser(borrowerID)
		owner = UserAccount.get_by_id(self.owner.id())
		self.borrower = borrower.key
		if(date):
			self.due_date = datetime.datetime.strptime(date, '%Y-%m-%d');
		else:
			self.due_date = datetime.datetime.now() + datetime.timedelta(days=int(owner.lending_length))