Ejemplo n.º 1
0
 def get_context_data(self, **kwargs):
     kwargs[
         'team_short_name'] = self.object.code_name if self.use_team_code_names(
         ) else self.object.short_name
     kwargs['feedback_progress'] = FeedbackProgressForTeam(
         self.object, self.tournament)
     return super().get_context_data(**kwargs)
Ejemplo n.º 2
0
    def get_context_data(self, **kwargs):
        tournament = self.get_tournament()

        try:
            kwargs['debateteam'] = self.object.debateteam_set.select_related(
                'debate__round').prefetch_related(
                    'debate__round__motion_set').get(
                        debate__round=tournament.current_round)
        except ObjectDoesNotExist:
            kwargs['debateteam'] = None

        kwargs['feedback_progress'] = FeedbackProgressForTeam(
            self.object, tournament)

        return super().get_context_data(**kwargs)
Ejemplo n.º 3
0
    def get_context_data(self, **kwargs):
        tournament = self.tournament

        try:
            kwargs['debateteams'] = self.object.debateteam_set.select_related(
                'debate__round').prefetch_related(
                    'debate__round__motion_set').filter(
                        debate__round=tournament.current_round)
        except ObjectDoesNotExist:
            kwargs['debateteams'] = None

        kwargs[
            'team_short_name'] = self.object.code_name if self.use_team_code_names(
            ) else self.object.short_name
        kwargs['feedback_progress'] = FeedbackProgressForTeam(
            self.object, tournament)

        return super().get_context_data(**kwargs)