added the rate limit to the generate interview questions

This commit is contained in:
Faheed 2025-12-17 19:34:00 +03:00
parent 5471046f46
commit 0cb21885f7
3 changed files with 16 additions and 1 deletions

View File

@ -551,4 +551,16 @@ LOGGING = {
}
SECURED_FIELDS_KEY="kvaCwxrIMtVRouBH5mzf9g-uelv7XUD840ncAiOXkt4="
SECURED_FIELDS_KEY="kvaCwxrIMtVRouBH5mzf9g-uelv7XUD840ncAiOXkt4="
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
}
}

View File

@ -0,0 +1,2 @@

View File

@ -4800,6 +4800,7 @@ def interview_list(request):
from django_ratelimit.decorators import ratelimit
@ratelimit(key='user_or_ip', rate='1/m', block=True)
@login_required
@staff_user_required
def generate_ai_questions(request, slug):