You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is what I get when I run the project locally:
My ALLOWED_HOSTS is [] in settings.py. How do I fix the reCAPTCHA error? I think you might have to add localhost to your list of supported domains in your reCAPTCHA console (reference). Thank you!
The text was updated successfully, but these errors were encountered:
First you need to visit ReCaptcha Login and then go to admin console there are Add Option you need to fill all the details then you get public and private key!!
Once you get the public and private key replace with existing keys in code :
public key : login.html
class="g-recaptcha" data-sitekey="6LfHPwojAAAAAAmIefBYBh_y9qTAmKrzIXWF_6FZ"
private key : views.py
captcha_token = request.POST.get('g-recaptcha-response')
captcha_url = "https://www.google.com/recaptcha/api/siteverify"
captcha_key = "6LfHPwojAAAAAAtIjbi-7_N4fNf7Wp0LUiYlCDw_" # Consider using your secret key
data = {
'secret': captcha_key,
'response': captcha_token
}
This is what I get when I run the project locally:
My ALLOWED_HOSTS is [] in settings.py. How do I fix the reCAPTCHA error? I think you might have to add localhost to your list of supported domains in your reCAPTCHA console (reference). Thank you!
The text was updated successfully, but these errors were encountered: