-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
while django-recaptcha and django-hcaptcha can be used out-of the box with a very small extension of related <form_file>.py, e.g.
...
+# CAPTCHA support
+from django.conf import settings
+from captcha.fields import ReCaptchaField
+from hcaptcha.fields import hCaptchaField
...
class Form(forms.Form):
...
+ # CAPTCHA support
+ captcha_service = getattr(settings, 'CAPTCHA_SERVICE', None)
+ if captcha_service == 'recaptcha':
+ captcha = ReCaptchaField()
+ elif captcha_service == 'hcaptcha':
+ hcaptcha = hCaptchaField()
...
This is not working with this django-friendly-captcha as it is required to adjust the templates to inject the required script "assets" as mentioned here: https://pypi.org/project/django-friendly-captcha/
<script type="module" src="https://unpkg.com/friendly-challenge@0.9.8/widget.module.min.js" async defer></script>
<script nomodule src="https://unpkg.com/friendly-challenge@0.9.8/widget.min.js" async defer></script>
I would assume other FRC implementations have this hardcoded in templates, so for an easy replace-to-use I would suggest also to implement this in same way as recaptcha/hcaptcha have done this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels