from rest_framework.throttling import AnonRateThrottle
from rest_framework.exceptions import Throttled


class AdminLoginThrottle(AnonRateThrottle):
    scope = "admin_login"

    def throttle_failure(self):
        raise Throttled(
            detail="Too many login attempts. Please try again later."
        )