def manage_tagfilters_post_(request): form = request.web_input(do="", title="", rating="") if form.do == "create": blocktag.insert(request.userid, title=form.title, rating=define.get_int(form.rating)) elif form.do == "remove": blocktag.remove(request.userid, title=form.title) raise HTTPSeeOther(location="/manage/tagfilters")
def POST(self): form = web.input(do="", title="", rating="") if form.do == "create": blocktag.insert(self.user_id, title=form.title, rating=define.get_int(form.rating)) elif form.do == "remove": blocktag.remove(self.user_id, title=form.title) raise web.seeother("/manage/tagfilters")
def test_duplicate_blocked_tag(self): user = db_utils.create_user() blocktag.insert(user, title="orange", rating=ratings.GENERAL.code, tagid=None) blocktag.insert(user, title="orange", rating=ratings.GENERAL.code, tagid=None)