コード例 #1
0
 def make_response(self):
     res = {}
     if self._data:
         res['data'] = self._data
     if self._new_captcha:
         res['captcha'] = get_iden()
     if self._ratelimit:
         res['ratelimit'] = self._ratelimit
     res['errors'] = [(e[0], c.errors[e].message, e[1]) for e in self._errors]
     return {"json": res}
コード例 #2
0
 def new_captcha(self):
     if not self._new_captcha:
         self.captcha(get_iden())
         self._new_captcha = True