skip to navigation
skip to content

nobot 0.4.1

Django recaptcha form field/widget app.

Django reCAPTCHA form field/widget integration app.

Installation

  1. Install or add nobot to your Python path.

  2. Add nobot to your INSTALLED_APPS setting.

  3. Add a NOBOT_RECAPTCHA_PUBLIC_KEY setting to the project’s settings.py file. This is your public API key as provided by reCAPTCHA, i.e.:

    NOBOT_RECAPTCHA_PUBLIC_KEY = '76wtgdfsjhsydt7r5FFGFhgsdfytd656sad75fgh'
    

    This can be seperately specified at runtime by passing a public_key parameter when constructing the ReCaptchaField, see field usage below.

  4. Add a NOBOT_RECAPTCHA_PRIVATE_KEY setting to the project’s settings.py file. This is your private API key as provided by reCAPTCHA, i.e.:

    NOBOT_RECAPTCHA_PRIVATE_KEY = '98dfg6df7g56df6gdfgdfg65JHJH656565GFGFGs'
    

    This can be seperately specified at runtime by passing a private_key parameter when constructing the ReCaptchaField, see field usage below.

Usage

Field

The quickest way to add reCAPTHCA to a form is to use the included ReCaptchaField field type. A ReCaptcha widget will be rendered with the field validating itself without any further action required from you. For example:

from django import forms
from nobot.fields import ReCaptchaField

class FormWithCaptcha(forms.Form):
    captcha = ReCaptchaField()

The reCAPTCHA widget supports several Javascript options variables customizing the behaviour of the widget, such as theme and lang. You can forward these options to the widget by passing an attr parameter containing a dictionary of options to ReCaptchaField, i.e.:

captcha = ReCaptchaField(attrs={'theme' : 'clean'})

The captcha client takes the key/value pairs and writes out the RecaptchaOptions value in JavaScript.

Credits

Originally developed under the name django-recaptcha by Praekelt Consulting. Forked for better testability and extensibility. Authors =======

nobot was previously developed under the name django-recaptcha and under the Copyright of Praekelt Foundation. The following copyright notice holds true for releases before the renaming: “Copyright (c) by Praekelt Foundation

Package Maintainer

  • Christopher Grebs

Praekelt Foundation

  • Shaun Sephton
  • Peter Pistorius
  • Hedley Roos

bTaylor Design

 
File Type Py Version Uploaded on Size
nobot-0.4.1-py2.py3-none-any.whl (md5) Python Wheel 3.5 2016-01-20 11KB
nobot-0.4.1.tar.gz (md5) Source 2016-01-20 9KB