Example #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)
Example #2
0
    def get(self):
        super(Verify, self).prepare()
        from model.zsite_verify import zsite_verify_ajust
        current_user = self.current_user
        ajust = zsite_verify_ajust(current_user)

        if not self._finished:
            current_user_id = self.current_user_id
            state = current_user.state

            if state >= ZSITE_STATE_VERIFY:
                from model.zsite_url import url_by_id
                if not url_by_id(current_user_id):
                    link = "/i/url"
                else:
                    link = '/'
                return self.redirect(link)
            elif state <= ZSITE_STATE_APPLY:
                return self.redirect('/auth/verify/sended/%s' %
                                     current_user_id)

        self.render(ajust=ajust)
Example #3
0
    def get(self):
        super(Verify, self).prepare()
        from model.zsite_verify import zsite_verify_ajust

        current_user = self.current_user
        ajust = zsite_verify_ajust(current_user)

        if not self._finished:
            current_user_id = self.current_user_id
            state = current_user.state

            if state >= ZSITE_STATE_VERIFY:
                from model.zsite_url import url_by_id

                if not url_by_id(current_user_id):
                    link = "/i/url"
                else:
                    link = "/"
                return self.redirect(link)
            elif state <= ZSITE_STATE_APPLY:
                return self.redirect("/auth/verify/sended/%s" % current_user_id)

        self.render(ajust=ajust)