Add-on djangocms-form-builder to add an invisible honeypot anti-spam field
Project description
djangocms_form_builder_honeypot
Greffon pour djangocms-form-builder qui ajoute automatiquement un champ leurre invisible aux formulaires CMS pour filtrer les soumissions de bots.
Fonctionnalités
- Injection automatique : un champ texte masqué est ajouté à chaque formulaire CMS via un processeur CMS (sans surcharger les templates Bootstrap du form-builder)
- Rendu identique aux autres champs (
form-floating,form-control, etc.) - Détection heuristique : rejette les soumissions avec texte aléatoire ou emails obfusqués (bots qui contournent le honeypot)
- Rejet silencieux : par défaut, les bots voient un succès mais aucune action (email, Brevo, sauvegarde BDD) n'est exécutée
- Configuration par formulaire dans l'admin CMS (section « Anti-spam » du plugin Form)
- Valeurs par défaut configurables globalement via les settings Django
Requirements
- Python 3.10+
- Django 3.2+
- djangocms-form-builder ^0.5
- django-cms
Installation
pip install djangocms_form_builder_honeypot
Configuration
- Ajoutez
djangocms_form_builder_honeypotàINSTALLED_APPS(aprèsdjangocms_form_builder) :
INSTALLED_APPS = [
# ...
"djangocms_form_builder",
"djangocms_form_builder_honeypot",
# ...
]
Le module enregistre automatiquement un CMS_PLUGIN_PROCESSOR pour injecter le champ dans le HTML rendu du plugin Form.
- Valeurs par défaut dans
settings.py(utilisées à la création d'un nouveau formulaire CMS) :
DJANGOCMS_FORM_BUILDER_HONEYPOT_ENABLED = True
DJANGOCMS_FORM_BUILDER_HONEYPOT_FIELD_NAME = "site_web"
DJANGOCMS_FORM_BUILDER_HONEYPOT_LABEL = "Site web"
DJANGOCMS_FORM_BUILDER_HONEYPOT_SILENT_REJECT = True
DJANGOCMS_FORM_BUILDER_HONEYPOT_HEURISTIC_SPAM_ENABLED = True
DJANGOCMS_FORM_BUILDER_HONEYPOT_SUCCESS_MESSAGE = "<p>Merci pour votre message.</p>"
- Dans l'admin CMS, ouvrez un plugin Form : la section Anti-spam permet de configurer pour chaque formulaire :
- Activer / désactiver le champ leurre
- Nom et libellé du champ
- Rejet silencieux
- Détection heuristique du spam (texte aléatoire, emails obfusqués)
Fonctionnement
Le champ est rendu comme un champ texte classique du form-builder, puis masqué hors écran. Les utilisateurs humains ne le voient pas ; les bots le remplissent souvent. Si le champ contient une valeur à la soumission, la requête est ignorée côté serveur.
Le module complète les protections existantes (Altcha, login requis, etc.) sans interaction utilisateur supplémentaire.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djangocms_form_builder_honeypot-0.0.3.tar.gz.
File metadata
- Download URL: djangocms_form_builder_honeypot-0.0.3.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.1 Linux/6.12.76-linuxkit
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e575dfaabc186416cb89d2ad9416aafd4fd3cf343ce030476d5c3cead4aeef5
|
|
| MD5 |
c97b86abb4c15279c9c25126d34f90ce
|
|
| BLAKE2b-256 |
43605a60155b3249a8f9efc7fa2061b94a99697d56f6285aa7c4dad693c66f84
|
File details
Details for the file djangocms_form_builder_honeypot-0.0.3-py3-none-any.whl.
File metadata
- Download URL: djangocms_form_builder_honeypot-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.1 Linux/6.12.76-linuxkit
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daa4b53913a3efaea725179c0748ea1c36ad409cc35223aec5229f8a10a84410
|
|
| MD5 |
30f6ece75f9fa41c09c300609c2d98ff
|
|
| BLAKE2b-256 |
2e01f7863668b718a4fd39abb76158b388e5e3643eaf94443de2bf73dacdf5d7
|