Giter Club home page Giter Club logo

plone.formwidget.recaptcha's Introduction

Introduction

plone.formwidget.recaptcha is a z3c.form ReCaptcha widget for use with Plone.

It is a z3c.form re-implementation of the collective.recaptcha package original written by David Glick.

Buildout Installation

Add the following code to your buildout.cfg to install plone.formwidget.recaptcha:

[buildout]
...

[instance]
...
eggs =
    ...
    plone.formwidget.recaptcha
    ...

ReCaptcha setup

There is a control panel at http://path/to/site/@@recaptcha-settings to configure the Addon. Google provides a set of test keys, that can be used to try out the recaptcha form and documentation at https://developers.google.com/recaptcha/docs/faq.

Site key: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI

Secret key: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe

To actually use the service, you must obtain a site key and secret key from developers.google.com/recaptcha

Usage

See the demo folder inside the distribution for an example usage.

Supermodel

You can add a captcha field in an XML model by adding something like this:

<field name="captcha" type="plone.formwidget.recaptcha.ReCaptchaWidget">
  <title>Solve Captcha</title>
  <description></description>
</field>

Upgrade to API v2

plone.formwidget.recaptcha 2.* uses V2 of the reCaptcha API. Users upgrading from plone.formwidget.recaptcha 1.* will therefore need to generate new keys as global Keys are not supported in the V2 API.

Source Code

Contributors please read the document Process for Plone core's development

Sources are at the Plone code repository hosted at Github.

plone.formwidget.recaptcha's People

Contributors

aormazabal avatar bloodbare avatar cekk avatar davidjb avatar davisagli avatar erral avatar frapell avatar gforcada avatar jensens avatar jpgimenez avatar lucid-0 avatar mamico avatar petschki avatar staeff avatar thet avatar tisto avatar wesleybl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plone.formwidget.recaptcha's Issues

refactor to reflect changes due to usage of norecaptcha

plone.formwidget.recaptcha now uses norecaptcha, which handles much of the integration by itself.
also some things got obsolete, due to changes of googles recaptcha API.

the package is working OOTB and I removed the JS in the project where i'm using this, so for me this is low priority.

delete

Sorry, please delete the comment. I commented the wrong add-on.

New released need with Python 3 compatiblity

The 2.1.0 release claims Python 3 compatiblity but this is not true:

    raise TypeError(_ADVICE_ERROR % 'implementer_only')
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/ajung/sandboxes/onkopedia_buildout-plone5/eggs/Products.CMFPlone-5.2rc3-py3.7.egg/Products/CMFPlone/meta.zcml", line 38.4-42.10
    File "/home/ajung/sandboxes/onkopedia_buildout-plone5/parts/wsgi.py/etc/site.zcml", line 12.2-12.39
    TypeError: Class advice impossible in Python3.  Use the @implementer_only class decorator instead.
sys:1: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 20080)>

The current master is compatible with Python 3...could we have a new release please?

Release?

May we have a release here? I can do this too if one provides me with permission on pypi (jensens)
@tisto @davisagli @plone/release-team
TIA!

Provide a field to use with an XML model

Just declaring the widget using form:widget is not enough to use the captcha, you still need to override the edit or add forms in order to perform validation.

Providing a field, allows the captcha to be used by only declaring it in the model

Use `requests` instead of `urllib` for HTTP requests

The package uses standardlibs urllib for HTTP request. (https://github.com/plone/plone.formwidget.recaptcha/blob/master/src/plone/formwidget/recaptcha/norecaptcha.py) To support Python 2 and 3 the imports have to be made through six.

requests (http://docs.python-requests.org/en/master/) makes HTTP requests easier and would not be needed to be imported through six. Is already used in other places in Plone and Add-Ons, so declaring it as dependency shouldn't do any harm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.