Example #1
0
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")
Example #2
0
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")
Example #3
0
    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")
Example #4
0
 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)
Example #5
0
    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")
Example #6
0
 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)