def DoGet(self): additional_values = { 'players': Player.all_by_rank(), } self.template_values.update(additional_values) self.render_to_response("players.html")
def get_players(self): """ Returns all players by specified or default ordering. """ order = self.request.get('order_by') # Default to ELO ordering if not order: order = 'elo' return Player.all_by_rank(order)
def DoGet(self): additional_values = { 'active_games': Game.gql("WHERE player_2 != NULL AND completed_date = NULL"), 'available_games': Game.gql("WHERE player_2 = NULL"), 'players': Player.all_by_rank().fetch(5, 0), # just the top players 'completed_games': Game.all_completed().fetch( 5, 0) # just a few recently completed games } self.template_values.update(additional_values) self.render_to_response("index.html")