Ejemplo n.º 1
0
	def get(self):
		players_by_league = Player.get_players_by_league()
		players_by_league_l = []
		for league, players in players_by_league.iteritems():
			players_by_league_l.append(dict(league=league, players=players))

		players_by_league_l.reverse()
		tvals = {
			'players_by_league': players_by_league_l
		}
		self.yield_page("rankings", tvals)
Ejemplo n.º 2
0
	def get(self):
		players_by_league = Player.get_players_by_league()
		players_by_league_l = []
		for league, players in players_by_league.iteritems():
			players_by_league_l.append(dict(league=league, players=players))

		players_by_league_l.reverse()
		user = users.get_current_user()
		if user is None:
			self.redirect(users.create_login_url(self.request.uri))
		else:
			players = [(player.identity, player.nickname) for player in Player.all().run()]
			tvals = {
				'player_choices': players,
				'initial_options': range(12), # start with game to 11
				'players_by_league': players_by_league_l
			}
			self.yield_page("index", tvals)