def control_uploadavatar_(request): form = request.web_input(image="") manage = avatar.upload(request.userid, form.image) if manage: raise HTTPSeeOther(location="/manage/avatar") else: raise HTTPSeeOther(location="/control")
def POST(self): form = web.input(image="") manage = avatar.upload(self.user_id, form.image) if manage: raise web.seeother("/manage/avatar") else: raise web.seeother("/control")
def removeavatar(userid, otherid): avatar.upload(otherid, None) note_about(userid, otherid, 'Avatar was removed.')