IMPORTANT MALWARE ISSUE: https://blog.sucuri.net/2015/06/sweetcaptcha-service-used-to-distribute-adware.html
Django SweetCaptcha form field/widget integration app.
django-sweetcaptcha provides a form field to integrate the sweetCaptcha service.
- Install or add
django-sweetcaptcha
to your Python path. - Add
sweetcaptcha
to yourINSTALLED_APPS
setting. - Register your sweetCaptcha account here.
- Add
SWEETCAPTCHA_APP_ID
andSWEETCAPTCHA_APP_KEY
settings to the project'ssettings.py
file. These settings are provided by the previous step.
The quickest way to add sweetcaptcha to a form is to use the included SweetCaptchaField
field type. A SweetCaptcha
widget will be rendered with the field validating itself without any further action required from you. For example:
from django import forms
from sweetcaptcha.fields import SweetCaptchaField
class FormWithCaptcha(forms.Form):
sweetcaptcha = SweetCaptchaField()
To allow for runtime specification of keys:
sweetcaptcha = SweetCaptchaField(
app_id='your_app_id_here',
app_key='your_key_here'
)
If specified these parameters will be used instead the ones specified in your project settings.
client.py
taken from sweetcaptcha by Jaime Wyant
.
Thanks to sweetcaptcha