diff options
author | Matthew Lemon <y@yulqen.org> | 2024-12-08 21:18:23 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-12-08 21:18:23 +0000 |
commit | d3dda8c0bd194c28cf11c189c150c00bdc3e8a83 (patch) | |
tree | 28a656ea58e1420cc0da024eeadcc6ff1b30f234 /alphabetlearning/payments/views.py | |
parent | 411e79ada3d5bf315000ff5bb598235118d50b51 (diff) |
wip: working on ratelimit - not quite working in the browser
Diffstat (limited to 'alphabetlearning/payments/views.py')
-rw-r--r-- | alphabetlearning/payments/views.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/alphabetlearning/payments/views.py b/alphabetlearning/payments/views.py index 7f13e81..2be5344 100644 --- a/alphabetlearning/payments/views.py +++ b/alphabetlearning/payments/views.py @@ -15,6 +15,7 @@ from django.views import View from django.views.decorators.csrf import csrf_exempt from django.views.generic import DeleteView from django.views.generic import TemplateView +from django_ratelimit.decorators import ratelimit from alphabetlearning.payments.models import EmailSignup from alphabetlearning.payments.models import EmailVerification @@ -57,6 +58,7 @@ class SuccessEmailSignupView(TemplateView): return context +@ratelimit(key="ip", rate="2/m", block=True) def email_signup_verification(request): if request.method == "POST": form = EmailVerificationForm(request.POST) |