Upgraded django-recaptcha to 4.0.0. (馃幎 one more time 馃幎 ) #1485
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OK folks, I think this one might stick.
I tested it locally by getting my own recaptcha keys and I can then see that the captcha is validated (I get an error from stripe which seems to indicate that things will work once in production:
No such product: 'dummy_monthly_id'
).There were three things I had to change compared to the original commit 16787c8:
onsubmit
event and doing the call togrecaptcha.execute(...)
manually.captcha
form field (this part was missing in my previous attempt 901bdd9action
, otherwise the captcha validation fails (this was also missing in my previous attempt).I've got a good feeling about this one 馃馃徎
EDIT I had to fix some tests that were breaking because the recaptcha test keys don't work with a custom
action
as documented in https://github.com/django-recaptcha/django-recaptcha/?tab=readme-ov-file#local-development-and-functional-testing