Ejemplo n.º 1
0
	def GET(self):
		session = web.config._session
		filters = web.input(week=None, team=None)
		if filters.team != None:
			userId = auctionDb.getUser(username=filters.team)['user_id']
		elif 'userid' in session and session.userid != None:
			userId = session.userid
			filters.team = auctionDb.getUser(userId=userId)['user_alias']
		else:
			filters.team = auctionDb.getAllTeamNames()[0]
			userId = auctionDb.getUser(username=filters.team)['user_id']
		if filters.week != None:
			filters.week = int(filters.week)
		else:
			filters.week = auctionDb.getCurrentWeek()
		rosterList = auctionDb.getLineup(userId, filters.week)
		bidList = auctionDb.getUserBids(userId, filters.week)
		filters.userId = userId
		return str(getTemplateSystem(session, filters).team(rosterList, bidList))
Ejemplo n.º 2
0
	def __init__(self, session=None, filters=None):
		self.session = session
		self.filters = filters
		self.weeks = auctionDb.getAllWeeks()
		self.users = auctionDb.getAllTeamNames()