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 (2016-11-04)
Initial version [instification]
Project details
Release history Release notifications | RSS feed
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.tar.gz
(15.8 kB
view details)
File details
Details for the file pyramid_recaptcha-1.0.tar.gz
.
File metadata
- Download URL: pyramid_recaptcha-1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b0e71d9f89716e4d6261770c73192ea97ea70974f1ec5038d243cdc090a0d59 |
|
MD5 | 72d8c4f479c78a29aedd27eab346195b |
|
BLAKE2b-256 | 94f509730b7307f13b6700f82b3d3dc44de45a7a0a273ded2a5f398c92f92863 |