def POST(self, id): form = New.form() if not form.validates(): return render.controlEdit(form) model.update_control(id, form.d.name, form.d.encoding, form.d.is_enable, form.d.description) raise web.seeother('/control')
def GET(self, id): control = model.get_control(id) form = New.form() form.fill(control) return render.controlEdit(form)