Skip to main content

Django recaptcha form field/widget app.

Project description

Django reCAPTCHA form field/widget integration app.

https://travis-ci.org/EnTeQuAk/nobot.svg?branch=master https://badge.fury.io/py/nobot.png https://pypip.in/d/nobot/badge.png

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 Foundation. 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

Other

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nobot-0.3.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

nobot-0.3-py2.py3-none-any.whl (11.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nobot-0.3.tar.gz.

File metadata

  • Download URL: nobot-0.3.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nobot-0.3.tar.gz
Algorithm Hash digest
SHA256 e140cd75bb4bff1478d7e0ae54fbeb7ffbc4f4ddd00a11cf498c17e19b762ee7
MD5 03b4375a8de0f05061944fdadbc2ab28
BLAKE2b-256 aa35ceeddfcec6b9ad36b4d88875be67211165307ff89db664facd6eb4a8c4e0

See more details on using hashes here.

Provenance

File details

Details for the file nobot-0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nobot-0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c46ef4063f2ba8281eec81a83e7449305d93b404bf48313a7ebc4f9e361a3918
MD5 1369b4dc3275af107bc529ac5c18f4f6
BLAKE2b-256 e819041f7447feba722ecf4782d611c7ca468b6b8f9dad87a77358169df8c835

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page