Skip to main content

Captcha support for Silva

Project description

Copyright (c) 2008, Infrae. All rights reserved. See also LICENSE.txt

Captcha Support for Silva

This is a captcha support for Silva. It works with the help of collective.captcha, and plone.keyring.

After installing the extension, you can either use a formlib widget, or ask the captcha directly.

You can get the captcha image in your template the following way:

<tal:captcha tal:define="captcha nocall:here/@@captcha"
             tal:content="structure captcha/image_tag">
</tal:captcha>

You can get the captcha as a sound file like this:

<div class="captchaAudio"
     tal:define="captcha nocall:here/@@captcha">
   <a href="#" target="_blank"
      tal:attributes="href captcha/audio_url">Audio version</a>
</div>

You can validate an captcha entry like this:

from zope.component import getMultiAdapter


captcha = getMultiAdapter((self.context, self.request), name='captcha')
if not captcha.verify(input):
    # Bad value
else:
    # Good value

This extension require at least Silva 2.0.7 or higher. You can have more information about collective.captcha.

Installation

If you installed Silva using buildout, by getting one from the Infrae SVN repository, or creating one using Paster, you should edit your buildout configuration file buildout.cfg to add or edit the following section:

[instance]

eggs = ...
      silva.captcha

zcml = ...
      silva.captcha

If the section instance wasn’t already in the configuration file, pay attention to re-copy values for eggs and zcml from the profile you use.

After you can restart buildout:

$ ./bin/buildout

If you don’t use buildout, you can install this extension using easy_install, and after create a file called silva.captcha-configure.zcml in the /path/to/instance/etc/package-includes directory. This file will responsible to load the extension and should only contain this:

<include package="silva.captcha" />

Latest version

The latest version is available in a Subversion repository.

Changelog

1.0.1 (04/06/2008)

  • Fix broken extension uninstall,

  • Add simple test to test extension install/uninstall.

1.0 (27/05/2008)

  • Initial release

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

silva.captcha-1.0.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

silva.captcha-1.0.1-py2.4.egg (10.1 kB view details)

Uploaded Source

File details

Details for the file silva.captcha-1.0.1.tar.gz.

File metadata

File hashes

Hashes for silva.captcha-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d791bd1ed18651846ff9725169060efd776b5a87a922d584be68ceeebddf28dc
MD5 1e5bc77749349a379c58716f9429c44f
BLAKE2b-256 b0bc0a04c9bda5592e1713e573cdbf49cf56db296162e27ac0ee5afacb9a3306

See more details on using hashes here.

File details

Details for the file silva.captcha-1.0.1-py2.4.egg.

File metadata

File hashes

Hashes for silva.captcha-1.0.1-py2.4.egg
Algorithm Hash digest
SHA256 67dccdb4cdc76aee3aa56f381be0ab5a9cb8e289f4fd9648e4f58e9be7a13174
MD5 a265f8043ab1bec304552c51e8f823b1
BLAKE2b-256 dff71caade3b4ce4575009cd00a4d21ed0b9680a25da8975d0526ec69bc4ea10

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