Adding Google reCapthca - 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


06 Sept. 2024 | Last Updated: 22 Nov. 2025 | jaimedcsilva

Related
  • Django Registration + Django Auth - Part 1
  • Django Registration + Django Auth - Part 2
  • Django Registration + Django Auth - Part 3
  • Django Registration + Django Auth - Part 4
  • Adding Google reCapthca - Part 5
  • Adding Google Recapthca - Part 6

  • Buy Me a Coffee