Adding Google reCAPTCHA - Part 5
pip install django-recaptcha==3.0.0

 

INSTALLED_APPS = [
    ...
    'captcha',
]

RECAPTCHA_PUBLIC_KEY = "******"   # We will get this value in the next post
RECAPTCHA_PRIVATE_KEY = "******"  # We will get this value in the next post

 

from captcha.fields import ReCaptchaField

class MyRegistrationForm(RegistrationFormUniqueEmail):
    ...
    captcha = ReCaptchaField()

 


Python 3.12
Django==4.2
django-registration==3.3
django-recaptcha==3.0.0