def get_table(self): table = TabbycatTableBuilder(view=self, sort_key="rk") try: standings, rounds = self.get_standings() except StandingsError as e: messages.error(self.request, self.get_standings_error_message(e)) logger.exception("Error generating standings: " + str(e)) return table # Easiest to redact info here before passing to column constructors if hasattr(self, 'public_page_preference'): for info in standings: if info.speaker.anonymous: info.speaker.anonymise = True info.speaker.team.anonymise = True table.add_ranking_columns(standings) table.add_speaker_columns([info.speaker for info in standings]) table.add_team_columns([info.speaker.team for info in standings]) scores_headers = [{'key': round.abbreviation, 'title': round.abbreviation} for round in rounds] scores_data = [[metricformat(x) if x is not None else '—' for x in standing.scores] for standing in standings] table.add_columns(scores_headers, scores_data) table.add_metric_columns(standings, integer_score_columns=self.integer_score_columns(rounds)) return table
def get_table(self): table = TabbycatTableBuilder(view=self, sort_key="Rk") try: standings, rounds = self.get_standings() except StandingsError as e: messages.error(self.request, self.get_standings_error_message(e)) logger.exception("Error generating standings: " + str(e)) return table # Easiest to redact info here before passing to column constructors if hasattr(self, 'public_page_preference'): for info in standings: if info.speaker.anonymous: info.speaker.anonymise = True info.speaker.team.anonymise = True table.add_ranking_columns(standings) table.add_speaker_columns([info.speaker for info in standings]) table.add_team_columns([info.speaker.team for info in standings]) scores_headers = [round.abbreviation for round in rounds] scores_data = [ list(map(metricformat, standing.scores)) for standing in standings ] table.add_columns(scores_headers, scores_data) table.add_metric_columns(standings) return table
def get_table(self): self.standings = self.get_standings() table = TabbycatTableBuilder(view=self, title=self.object.name, sort_key='Rk') table.add_ranking_columns(self.standings) table.add_column("Break", [tsi.break_rank for tsi in self.standings]) table.add_team_columns([tsi.team for tsi in self.standings]) table.add_metric_columns(self.standings) return table
def get_table(self): self.standings = self.get_standings() table = TabbycatTableBuilder(view=self, title=self.object.name, sort_key='Rk') table.add_ranking_columns(self.standings) table.add_column({'title': _("Break"), 'key': 'break'}, [tsi.break_rank for tsi in self.standings]) table.add_team_columns([tsi.team for tsi in self.standings]) table.add_metric_columns(self.standings) return table
def get_table(self): standings, rounds = self.get_standings() table = TabbycatTableBuilder(view=self, sort_key="Rk") table.add_ranking_columns(standings) table.add_team_columns([info.team for info in standings], show_divisions=self.get_tournament().pref('enable_divisions')) table.add_standings_results_columns(standings, rounds, self.show_ballots()) table.add_metric_columns(standings) return table
def get_table(self): standings, rounds = self.get_standings() table = TabbycatTableBuilder(view=self, sort_key="Rk") table.add_ranking_columns(standings) table.add_speaker_columns([info.speaker for info in standings]) table.add_team_columns([info.speaker.team for info in standings]) scores_headers = [round.abbreviation for round in rounds] scores_data = [list(map(metricformat, standing.scores)) for standing in standings] table.add_columns(scores_headers, scores_data) table.add_metric_columns(standings) return table
def get_table(self): standings, rounds = self.get_standings() table = TabbycatTableBuilder(view=self, sort_key="Rk") table.add_ranking_columns(standings) table.add_team_columns( [info.team for info in standings], show_divisions=self.get_tournament().pref('enable_divisions')) table.add_standings_results_columns(standings, rounds, self.show_ballots()) table.add_metric_columns(standings) return table
def get_table(self): table = TabbycatTableBuilder(view=self, sort_key="rk") try: standings, rounds = self.get_standings() except StandingsError as e: messages.error(self.request, self.get_standings_error_message(e)) logger.exception("Error generating standings: " + str(e)) return table table.add_ranking_columns(standings) table.add_team_columns([info.team for info in standings], show_break_categories=True) table.add_standings_results_columns(standings, rounds, self.show_ballots()) table.add_metric_columns(standings, integer_score_columns=self.integer_score_columns(rounds)) return table