def GET(self, id): form = editpwd_form() req = web.ctx.req req.update({ 'form': form, }) return render.user_editpwd(**req)
def POST(self, id): form = editpwd_form() if not form.validates(): req = web.ctx.req req.update({ 'form': form, }) return render.user_editpwd(**req) change_password(int(id), form.d) raise web.seeother('/user/index')