From 2649f9c2193b6b625179840c3ec46676df3842ac Mon Sep 17 00:00:00 2001 From: Gigin George Date: Mon, 6 Mar 2023 18:54:28 +0530 Subject: [PATCH] Add Ratelimiting Docs comment --- config/ratelimit.py | 1 + config/settings/base.py | 1 + 2 files changed, 2 insertions(+) diff --git a/config/ratelimit.py b/config/ratelimit.py index 4d59c8dcf3..435076c726 100644 --- a/config/ratelimit.py +++ b/config/ratelimit.py @@ -21,6 +21,7 @@ def validatecaptcha(request): return False +# refer https://django-ratelimit.readthedocs.io/en/stable/rates.html for rate def ratelimit( request, group="", keys=[None], rate=settings.DJANGO_RATE_LIMIT, increment=True ): diff --git a/config/settings/base.py b/config/settings/base.py index 9f3db9e747..e5e1976226 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -324,6 +324,7 @@ def GETKEY(group, request): return "ratelimit" +# https://django-ratelimit.readthedocs.io/en/stable/rates.html DJANGO_RATE_LIMIT = env("RATE_LIMIT", default="5/10m") GOOGLE_RECAPTCHA_SECRET_KEY = env("GOOGLE_RECAPTCHA_SECRET_KEY", default="")