From 5259a8d17eb13a0e89048a9d32f1433ff817c385 Mon Sep 17 00:00:00 2001 From: thecyberlearn Date: Fri, 5 Sep 2025 03:07:23 +0530 Subject: [PATCH] Temporarily disable django-ratelimit to fix deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Comment out django-ratelimit imports and decorators - Docker cache issue preventing proper dependency installation - Will re-enable rate limiting after successful deployment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- authentication/views.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/authentication/views.py b/authentication/views.py index d20810a..3d00e2c 100644 --- a/authentication/views.py +++ b/authentication/views.py @@ -7,9 +7,9 @@ from django.http import JsonResponse from django.core.mail import send_mail from django.conf import settings from django.urls import reverse -from django_ratelimit.decorators import ratelimit -from django_ratelimit import UNSAFE -from django_ratelimit.exceptions import Ratelimited +# from django_ratelimit.decorators import ratelimit +# from django_ratelimit import UNSAFE +# from django_ratelimit.exceptions import Ratelimited from .models import User, PasswordResetToken import logging @@ -44,7 +44,7 @@ def handle_ratelimited(request, exception): return render(request, 'authentication/login.html') -@ratelimit(key='ip', rate='5/m', method=UNSAFE, block=False) +# @ratelimit(key='ip', rate='5/m', method=UNSAFE, block=False) def login_view(request): """User login view with rate limiting (5 attempts per minute per IP)""" # Handle post-login session messages @@ -83,7 +83,7 @@ def login_view(request): return render(request, 'authentication/login.html') -@ratelimit(key='ip', rate='3/m', method=UNSAFE, block=False) +# @ratelimit(key='ip', rate='3/m', method=UNSAFE, block=False) def register_view(request): """User registration view with rate limiting (3 attempts per minute per IP)""" # Check if rate limited @@ -179,7 +179,7 @@ def profile_view(request): return render(request, 'authentication/profile.html', context) -@ratelimit(key='ip', rate='3/5m', method=UNSAFE, block=False) +# @ratelimit(key='ip', rate='3/5m', method=UNSAFE, block=False) def forgot_password_view(request): """Forgot password view with rate limiting (3 attempts per 5 minutes per IP)""" # Check if rate limited @@ -253,7 +253,7 @@ Quantum Tasks AI Team return render(request, 'authentication/forgot_password.html') -@ratelimit(key='ip', rate='3/5m', method=UNSAFE, block=True) +# @ratelimit(key='ip', rate='3/5m', method=UNSAFE, block=True) def reset_password_view(request, token): """Reset password view with rate limiting (3 attempts per 5 minutes per IP)""" reset_token = get_object_or_404(PasswordResetToken, token=token)