You are here: Home / LBN / Up2date / Plone and Zope / BastionLinux 19 / quintagroup.z3cform.captcha-1.0.3-1.lbn19.noarch

quintagroup.z3cform.captcha-1.0.3-1.lbn19.noarch

Package Attributes
RPM  quintagroup.z3cform.captcha-1.0.3-1.lbn19.noarch.rpm Architecture  noarch Size  31958 Created  2019/09/30 06:53:41 UTC
Package Specification
Summary Captcha field for z3cform based on quintagroup.captcha.core package
Group Application/Internet
License ZPL
Home Page http://pypi.python.org/packages/source/q/quintagroup.z3cform.captcha/quintagroup.z3cform.captcha-1.0.3.zip
Description

quintagroup.z3cform.captcha is a package that allows to add captcha to the z3c.form. As a result such forms are prevented from automatic submit. Captchas in a z3c form

Using quintagroup.z3cform.captcha in a z3c.form form is simple. Just add a Captcha field to your schema, use CaptchaWidgetFactory widget factory for this field and away you go:

>>> from zope.interface import Interface >>> from z3c.form import form, field >>> from quintagroup.z3cform.captcha import Captcha >>> from quintagroup.z3cform.captcha import CaptchaWidgetFactory

Now define form schema with Captch field

>>> class ICaptchaSchema(Interface): ... captcha = Captcha( ... title=(u'Type the code'), ... description=(u'Type the code from the picture shown below.'))

And set proper widget factory for the captcha field

>>> class CaptchaForm(form.Form): ... fields = field.Fields(ICaptchaSchema) ... fields['captcha'].widgetFactory = CaptchaWidgetFactory

and z3c.form will take care of the rest. The widget associated with this field will render the captcha and verify the use input automatically.

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(FileDigests)  
rpmlib(PartialHardlinkSets)  
rpmlib(CompressedFileNames)  
/bin/sh  
rpmlib(PayloadIsXz)  
Provides
quintagroup.z3cform
quintagroup.z3cform.captcha
Obsoletes
quintagroup.z3cform.captcha-egginfo

Document Actions