17 lines
446 B
Python
17 lines
446 B
Python
from django import forms
|
|
from django_recaptcha.fields import ReCaptchaField
|
|
from django_recaptcha.widgets import ReCaptchaV3
|
|
from django.conf import settings
|
|
|
|
|
|
class FormWithCaptcha(forms.Form):
|
|
captcha = ReCaptchaField(
|
|
widget=ReCaptchaV3(
|
|
attrs={
|
|
"required_score": 0.85,
|
|
}
|
|
),
|
|
public_key=settings.RECAPTCHA_PUBLIC_KEY,
|
|
private_key=settings.RECAPTCHA_PRIVATE_KEY,
|
|
)
|