def render_to_response(self, context): board_model = self.service.get_object_or_404(id=self.kwargs["board_id"]) board, player_board = ScrabblyService().new(board_model, self.get_current_player()) context = {"board": board_model, "player_board": player_board } context["tiles"] = BoardService().get_tiles(board_model) context["is_player_turn"] = self.service.is_player_turn(self.get_current_player(), board_model) return BaseView.render_to_response(self, context)
def render_to_response(self, context): context["boards"] = self.service.all() return BaseView.render_to_response(self, context)