示例#1
0
    def post(self, po_id):
        add = self.get_argument('add_spammer', None)
        del_all = self.get_argument('del_all', None)
        p = Po.mc_get(po_id)
        if p:
            user = p.user
            if user:
                user_id = user.id
            if add:
                spammer_new(user_id)

            if del_all:
                spammer_reset(user_id)

            po_rm(user_id, po_id)

        self.redirect('/po')
示例#2
0
    def post(self, po_id):
        add = self.get_argument("add_spammer", None)
        del_all = self.get_argument("del_all", None)
        p = Po.mc_get(po_id)
        if p:
            user = p.user
            if user:
                user_id = user.id
            if add:
                spammer_new(user_id)

            if del_all:
                spammer_reset(user_id)

            po_rm(user_id, po_id)

        self.redirect("/po")
示例#3
0
 def get(self, id):
     spammer_new(id)
     self.redirect('/zsite/%s' % id)
def main():
    for i in ormiter(Spammer):
        print "spaming",i.id
        spammer_new(i.id)