

@presentation.render_for(WeightsSequenceEditor)
def render_weightssequenceeditor(self, h, comp, model):
    with h.form(class_='weights-form'):
        kw = {
            'disabled': 'disabled',
        }
        if (not self.weights()):
            kw['placeholder'] = '10,20,30'
        (h << h.input(value=self.weights(), type='text', **kw).action(self.weights).error(self.weights.error))
        (h << h.button(_('Edit'), class_='btn btn-primary').action((lambda : comp.call(self, 'edit'))))
    return h.root

dataset/ETHPy150Open Net-ng/kansha/kansha/board/view.py render_weightssequenceeditor/original