コード例 #1
0
ファイル: setup.py プロジェクト: v-makarenko/vtoolsmq
    def cycler(self, id=None):
        self.__load_context()
        setup, struct = self.__load_setup(id)
        if not setup:
            abort(404)

        tc_field = fl.thermal_cycler_field(selected=setup.thermal_cycler_id)

        c.form = h.LiteralFormSelectPatch(
            value = {'thermal_cycler_id': unicode(tc_field['value'])},
            option = {'thermal_cycler_id': tc_field['options']}
        )
    	return render('/setup/cycler.html')
コード例 #2
0
ファイル: box2.py プロジェクト: v-makarenko/vtoolsmq
 def plate_distinct(self):
     values = Session.query(self.form_result['column']).distinct()
     
     field = None
     # special values
     if self.form_result['column'] == Plate.thermal_cycler:
         field = fl.thermal_cycler_field()
     elif self.form_result['column'] == Plate.droplet_generator:
         field = fl.droplet_generator_field()
     
     if field:
         c.form = h.LiteralForm(
             option = {self.form_result['field_name']: field['options']}
         )
     else:
         c.form = h.LiteralForm(
             option = {self.form_result['field_name']: sorted([(tup[0], str(tup[0])) for tup in values if tup[0] is not None])}
         )
     c.field_name = self.form_result['field_name']
     
     return render('/box2/select.html')
コード例 #3
0
ファイル: product.py プロジェクト: v-makarenko/vtoolsmq
 def __setup_batch_plate_fields(self):
     c.dg_method = dg_method_field()
     c.plate_type = plate_type_field()
     c.thermal_cyclers = fl.thermal_cycler_field()