简体   繁体   中英

Can't get the Captcha to appear

I have already installed django-recaptcha and included the captcha in installed apps. I am using the private key and public key from this page: https://github.com/praekelt/django-recaptcha .

I included the statement captcha = ReCaptchaField() . When I clicked the page, it appears like this:

Captcha: Input error: k: Format of site key was invalid

Not sure where the error is. Need some guidance.

The html looks like this:

在此输入图像描述

This is what i typed:

RECAPTCHA_PRIVATE_KEY = '98dfg6df7g56df6gdfgdfg65JHJH656565GFGFGs'
RECAPTCHA_PUBLIC_KEY = '76wtgdfsjhsydt7r5FFGFhgsdfytd656sad75fgh'
RECAPTCHA_USE_SSL = True

According to the following thread , switching the private key and public key around fixes this error. That is, use

RECAPTCHA_PUBLIC_KEY = '98dfg6df7g56df6gdfgdfg65JHJH656565GFGFGs'
RECAPTCHA_PRIVATE_KEY = '76wtgdfsjhsydt7r5FFGFhgsdfytd656sad75fgh'

instead of the other way around as given in the documentation .

您需要在谷歌注册才能获得自己的api密钥

Enter your website URL without "http://". without "www" without "/" (at end of website name) . I mean simply add website name there for example , you can add "xyz.com". This will solve the problem.

https://www.google.com/recaptcha/admin#whyrecaptcha

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM