def supply(request, page_name): """Supply view_objects contents, which are the player name, team and points.""" _ = page_name profile = request.user.get_profile() name = profile.name team = profile.team points = score_mgr.player_points(profile) return { "name": name, "team": team, "points": points, }
def supply(request, page_name): """Supply view_objects content, which is the set of team members.""" _ = page_name # Get the team members. team = request.user.get_profile().team if team: members_with_points = [] zero_point_members = [] for member in team_mgr.team_members(team): if score_mgr.player_points(member) > 0: members_with_points.append(member) else: zero_point_members.append(member) else: members_with_points = None zero_point_members = None return { "team_members": members_with_points, "zero_members": zero_point_members, }
def points(self): """Returns the overall total number of points for the user.""" return score_mgr.player_points(self, round_name="Overall")
def current_round_points(self): """Returns the total number of points for the user. Optional parameter for a round.""" current_round = challenge_mgr.get_round_name() return score_mgr.player_points(self, round_name=current_round)
def points(self): """Returns the total number of points for the user. Optional parameter for a round.""" return score_mgr.player_points(self)