谷歌云应用 » v2ex » 删除注册时的 reCAPTCHA 验证 - v2ex

删除注册时的 reCAPTCHA 验证

By life at 1 周前

删除注册时的 reCAPTCHA 验证:
# By keakon

修改main.py文件:

1 SignupHandler的get里把chtml的值改成''

class SignupHandler(webapp.RequestHandler):
def get(self):
site = GetSite()
member = False
+ chtml = ''
browser = detect(self.request)

2 post里把这段代码
# Verification: reCAPTCHA

template_values['recaptcha_error_message'] = '请重新输入 reCAPTCHA 验证码'
删掉
加一行template_values['recaptcha_error'] = 0,注意缩进

# Verification: reCAPTCHA
+ template_values['recaptcha_error'] = 0
template_values['errors'] = errors

目前尚无回复