def to_dict(self): out = Params() out.add(self.data, 'configurations') for line_data in self.lines: out.add(line_data, 'lines') return out.data
def parms_to_dict(self): params = Params({}) params.add(self.jsonify(), 'configurations') if self.device.device_type.name=='rc': for line in self.get_lines(): params.add(line.jsonify(), 'lines') return params.data
def parms_to_dict(self): params = Params({}) params.add(self.jsonify(), 'campaigns') for exp in Experiment.objects.filter(campaign = self): params.add(exp.jsonify(), 'experiments') configurations = Configuration.objects.filter(experiment=exp, type=0) for conf in configurations: params.add(conf.jsonify(), 'configurations') if conf.device.device_type.name=='rc': for line in conf.get_lines(): params.add(line.jsonify(), 'lines') return params.data