예제 #1
0
파일: validator.py 프로젝트: cmak/reddit
 def run(self, iden, solution):
     if (not c.user_is_loggedin or c.user.needs_captcha()):
         if not captcha.valid_solution(iden, solution):
             c.errors.add(errors.BAD_CAPTCHA)
예제 #2
0
파일: validator.py 프로젝트: pvh/reddit
 def run(self, iden, solution):
     if (not c.user_is_loggedin or c.user.needs_captcha()):
         if not captcha.valid_solution(iden, solution):
             self.set_error(errors.BAD_CAPTCHA)