Esempio n. 1
0
    def post(self):
        id = self.get_argument('id')
        name = self.get_argument('name', None)
        pic = self.get_argument('pic', None)
        career_id_list = map(int, self.get_arguments('career', ()))

        admin_id = self.current_user.id
        user = Zsite.mc_get(id)

        if career_id_list:
            for career_id in career_id_list:
                career_rm(career_id, int(id))
            from model.zsite_verify import zsite_verify_ajust
            zsite_verify_ajust(user)
        if name:
            zsite_name_rm(id)
        if pic:
            from model.ico import ico
            pic_no(ico.get(id), admin_id)
        return self.redirect("/zsite/verify/next/%s" % id)
Esempio n. 2
0
    def post(self, cid):
        current_user_id = self.current_user_id

        yes = self.get_argument("yes", "")
        no = self.get_argument("no", "")

        if yes:
            ids_yes = map(int, yes.split(" "))
        else:
            ids_yes = []

        if no:
            ids_no = map(int, no.split(" "))
        else:
            ids_no = []

        for i in ids_yes:
            pic_yes(i, current_user_id)

        for i in ids_no:
            pic_no(i, current_user_id)

        self.redirect(self.request.path)
Esempio n. 3
0
    def post(self, cid):
        current_user_id = self.current_user_id

        yes = self.get_argument('yes', '')
        no = self.get_argument('no', '')

        if yes:
            ids_yes = map(int, yes.split(' '))
        else:
            ids_yes = []

        if no:
            ids_no = map(int, no.split(' '))
        else:
            ids_no = []

        for i in ids_yes:
            pic_yes(i, current_user_id)

        for i in ids_no:
            pic_no(i, current_user_id)

        self.redirect(self.request.path)
Esempio n. 4
0
 def get(self, id, uid):
     admin_id = self.current_user.id
     pic_no(id, admin_id)
     self.redirect('/zsite/%s' % uid)