================
**Wagtail forms SweetCaptcha form field/widget integration app.**
wagtailsweetcaptcha provides a an easy wayto integrate the `django-sweetcaptcha <https://pypi.python.org/pypi/sweetcaptcha/>`_ field when using the Wagtail formbuilder.
Installation
------------
#. Install or add ``wagtailsweetcaptcha`` to your Python path.
#. Add ``wagtailsweetcaptcha`` to your ``INSTALLED_APPS`` setting.
#. Config django-sweetcaptcha as explained in `here <https://github.com/jordij/django-sweetcaptcha>`_.
Usage
-----
Field
~~~~~
The quickest way to add a sweetcaptcha field to a Wagtail Form Page is to inherit from the two options provided, ``SweetCaptchaForm`` or ``SweetCaptchaEmailForm``. The first options inherits from ``AbstractForm`` while the seconds does it from ``AbstractEmailForm``. Either way your page is going to display a sweetcaptcha field at the end of the form.
Example
.. code-block:: python
from wagtail.wagtailforms.models import AbstractFormField
from wagtail.wagtailadmin.edit_handlers import FieldPanel, InlinePanel, MultiFieldPanel
from wagtail.wagtailcore.fields import RichTextField
from modelcluster.fields import ParentalKey
from wagtailsweetcaptcha.models import SweetCaptchaEmailForm
class SubmitFormField(AbstractFormField):
page = ParentalKey('SubmitFormPage', related_name='form_fields')
class SubmitFormPage(SweetCaptchaEmailForm):
body = RichTextField(blank=True, help_text='Edit the content you want to see before the form.')
thank_you_text = RichTextField(blank=True, help_text='Set the message users will see after submitting the form.')
class Meta:
verbose_name = "Form submission page"
description = "Page with the form to submit"
SubmitFormPage.content_panels = [
FieldPanel('title', classname="full title"),
FieldPanel('body', classname="full"),
FieldPanel('thank_you_text', classname="full"),
InlinePanel(SubmitFormPage, 'form_fields', label="Form fields"),
MultiFieldPanel([
FieldPanel('to_address'),
FieldPanel('from_address'),
FieldPanel('subject'),
], "Email notification")
]
The sweetcaptcha field can't be added from the admin UI but will appear in your frontend.
Metadata
Release files for wagtailsweetcaptcha 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| wagtailsweetcaptcha-0.1.0.tar.gz | 3.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wagtailsweetcaptcha-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 8.6 kB
Release files / wagtailsweetcaptcha-0.1.0.tar.gz
| Download URL | wagtailsweetcaptcha-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32177998a906496fe6079747c6fccecd225f6c58ba9e94b7832bf5c404282c7c
|
|
BLAKE2b-256 checksum How to use checksums |
65b322377ab1903ca56e29eb4cf980b41c16d0a76f39e6caf9fd6cb8ffac9923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wagtailsweetcaptcha-0.1.0-py2.py3-none-any.whl
| Download URL | wagtailsweetcaptcha-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
16e114cf05c216ebb96e6f9e44f1853f9a161a2141d10041d6d934224d6e4d9f
|
|
BLAKE2b-256 checksum How to use checksums |
60857a47f213eb6ad505195cd0d1eccf88bda497a02242d53841a697bf15d588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wagtailsweetcaptcha 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.