def add_bs(self, type=None): log.debug("Build step typ: %s", type) fields = BuildSteps.byName(type).parameter.split() html = param_form.render( name="param_form", fields=fields, submit_text='Add build step', form_attrs=dict(id="param_form"), bs_type=type ) return dict(form=html)
def new(self, **kw): try: bt = cp.session['build_task'] except KeyError: cp.session['build_task'] = BuildTask() try: bt_list = cp.session['bt_list'] except KeyError: cp.session['bt_list'] =[] return dict(show_form=False, buildsteps = BuildSteps.select())