![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
django-nocaptcha-recaptcha
Advanced tools
Add new-style Google ReCaptcha widgets to your Django forms simply by adding a NoReCaptchaField field to said forms.
In late 2014, Google updated their ReCaptcha service, changing its API. The update significantly changes the appearance and function of ReCaptcha. This has been referred to as ReCaptcha 2 or "nocaptcha recaptcha".
This module is intended to be a successor to django-recaptcha to support the new style Google Recaptcha. It borrows a lot of the logic from the django-recaptcha, but has been updated to support the Google change.
For the Google documentation for this service, visit the following:
https://developers.google.com/recaptcha/intro
The original django-recaptcha project is located at the following location:
https://github.com/praekelt/django-recaptcha
pip install django-nocaptcha-recaptcha
Add nocaptcha_recaptcha to your INSTALLED_APPS setting
Add the following to settings.py
Required settings:
NORECAPTCHA_SITE_KEY (string) = the Google provided site_key
NORECAPTCHA_SECRET_KEY (string) = the Google provided secret_key
Optional Settings:
NORECAPTCHA_VERIFY_URL (string) = reCaptcha api endpoint for verification.
Best to leave this as the default setting.
Default is https://www.google.com/recaptcha/api/siteverify
NORECAPTCHA_WIDGET_TEMPLATE (string) = location for the widget template.
Default is nocaptcha_recaptcha/widget.html
Add the field to a form that you want to protect.
from nocaptcha_recaptcha.fields import NoReCaptchaField
class DemoForm(forms.Form):
.....
captcha = NoReCaptchaField()
Add Google's JavaScript library to your base template or elsewhere, so it is available on the page containing the django form.
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
(optional) You can customize the field.
You can add attributes to the g-recaptcha div tag through the following
captcha = NoReCaptchaField(gtag_attrs={'data-theme':'dark'}))
You can override the template for the widget like you would any other django template.
The demo project includes a fully working example of this module. To use it, run the following:
cd demo
export NORECAPTCHA_SITE_KEY="<your site key>"
export NORECAPTCHA_SECRET_KEY="<your secret key>"
./manage.py runserver
# in a browser, visit http://localhost:8000
python setup.py test
FAQs
Django nocaptcha recaptcha form field/widget app.
We found that django-nocaptcha-recaptcha demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.