Skip to main content

A pyramid/deform widget implementing googles recaptcha widget.

Project description

pyramid_recaptcha

pyramid_recaptcha is a deform widget for Pyramid, implementing the google recaptcha service. See (https://developers.google.com/recaptcha/)

Installation

Get a public and private API key from google. https://developers.google.com/recaptcha/

Add pyramid_recaptcha in install_requires in your setup.py. and edit production.ini in your Pyramid application to add:

pyramid.includes =
    ...
    pyramid_recaptcha

pyramid_recaptcha.public_key = your_public_key
pyramid_recaptcha.private_key = your_private_key

Add the widget to a form:

import colander
from pyramid_recaptcha import deferred_recaptcha_widget

class MyForm(colander.MappingSchema):

    captcha = colander.SchemaNode(colander.String(),
                                  title='Verify you are human',
                                  widget=deferred_recaptcha_widget)

Bind the request variable when rendering the form:

MyForm().bind(request=self.request)

Changelog

1.0.2 (2016-12-08)

  • Force relative import, fixes Python 3 [miohtama]

1.0.1 (2016-11-04)

  • Fix adding templates to search path [instification]

1.0 (2016-11-04)

  • Initial version [instification]

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

pyramid_recaptcha-1.0.2.tar.gz (15.6 kB view details)

Uploaded Source

File details

Details for the file pyramid_recaptcha-1.0.2.tar.gz.

File metadata

File hashes

Hashes for pyramid_recaptcha-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8a1eedc087934131155ab35a0fd37b66a13159cd3ab35690e4c24fb20b08296e
MD5 ad9e16d984f146881cd2fbe6c8946de1
BLAKE2b-256 96b5d3aad00cdbab24c507602274bbc2f6ba2f50a0018765f7e703c94c2e2782

See more details on using hashes here.

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