django recapcha
from django import forms
from captcha.fields import ReCaptchaField
class FormWithCaptcha(forms.Form):
captcha = ReCaptchaField()
4.2
5
from django import forms
from captcha.fields import ReCaptchaField
from captcha.widgets import ReCaptchaV2Invisible
class FormWithCaptcha(forms.Form):
captcha = ReCaptchaField(widget=ReCaptchaV2Invisible)
Thank you!
5
0
4.3
10
RECAPTCHA_PROXY = {'http': 'http://127.0.0.1:8000', 'https': 'https://127.0.0.1:8000'}
Thank you!
10
0
4.22
9
captcha = fields.ReCaptchaField(
widget=widgets.ReCaptchaV2Checkbox(
attrs={
'data-theme': 'dark',
'data-size': 'compact',
}
)
)
# The ReCaptchaV2Invisible widget
# ignores the "data-size" attribute in favor of 'data-size="invisible"'
Thank you!
9
0
3.75
8
SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']
Thank you!
8
0
4.33
3
RECAPTCHA_PUBLIC_KEY = 'MyRecaptchaKey123'
RECAPTCHA_PRIVATE_KEY = 'MyRecaptchaPrivateKey456'
Thank you!
3
0
4.2
10
RECAPTCHA_DOMAIN = 'www.recaptcha.net'
Thank you!
10
0
4.5
6
captcha = fields.ReCaptchaField(
widget=widgets.ReCaptchaV2Checkbox(
api_params={'hl': 'cl', 'onload': 'onLoadFunc'}
)
)
# The dictionary is urlencoded and appended to the reCAPTCHA api url.
Thank you!
6
0
4.5
4
INSTALLED_APPS = [
...,
'captcha',
...
]
Thank you!
4
0
Are there any code examples left?
New code examples in category Python