def ignoreuser_(request): form = request.web_input(userid="") otherid = define.get_int(form.userid) if form.action == "ignore": ignoreuser.insert(request.userid, [otherid]) elif form.action == "unignore": ignoreuser.remove(request.userid, [otherid]) raise HTTPSeeOther(location="/~%s" % (define.get_sysname(define.get_display_name(otherid))))
def ignoreuser_(request): form = request.web_input(userid="") otherid = define.get_int(form.userid) if form.action == "ignore": if not ignoreuser.check(request.userid, otherid): ignoreuser.insert(request.userid, otherid) elif form.action == "unignore": ignoreuser.remove(request.userid, otherid) raise HTTPSeeOther(location="/~%s" % (define.get_sysname(define.get_display_name(otherid))))
def POST(self): form = web.input(userid="") otherid = define.get_int(form.userid) if form.action == "ignore": if not ignoreuser.check(self.user_id, otherid): ignoreuser.insert(self.user_id, otherid) elif form.action == "unignore": ignoreuser.remove(self.user_id, otherid) raise web.seeother("/~%s" % (define.get_sysname(define.get_display_name(otherid))))
def control_ignoreuser_(request): form = request.web_input(username="") ignoreuser.insert(request.userid, define.get_userid_list(form.username)) raise HTTPSeeOther(location="/manage/ignore")
def POST(self): form = web.input(username="") ignoreuser.insert(self.user_id, define.get_userid_list(form.username)) raise web.seeother("/manage/ignore")