This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
[![Build Status](https://travis-ci.org/ImaginaryLandscape/django-nocaptcha-recaptcha.svg?branch=master)](https://travis-ci.org/ImaginaryLandscape/django-nocaptcha-recaptcha)

# SUMMARY

Add new-style Google ReCaptcha widgets to your Django forms simply by adding a
NoReCaptchaField field to said forms.

# ABOUT

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

# FEATURES

- Implements Google's New "NoCaptcha ReCaptcha Field"
- Uses the fallback option for browsers without JavaScript
- Easy to add to a Form via a FormField
- Works similar to django-recaptcha
- Working demo projects
- Works with Python 2.7 and 3.4

# INSTALL

pip install django-nocaptcha-recaptcha

# CONFIGURE

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.


# DEMO PROJECT

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

# TESTING

python setup.py test
Release History

Release History

0.0.19

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.18

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.17

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.16

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.15

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.14

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.13

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-nocaptcha-recaptcha-0.0.19.tar.gz (10.9 kB) Copy SHA256 Checksum SHA256 Source Mar 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting