o
    ul~ij                     @   sv   d dl mZ d dlmZ d dlmZ d dlmZmZ d dl	m
Z
 d dlmZ dgZddded	fd
dZee_ee_dS )    wraps)settings)import_string)ALLUNSAFE)Ratelimited)is_ratelimited	ratelimitNTc                    s    fdd}|S )Nc                    s"   t   fdd}|S )Nc              	      sp   t | dd}t| dd}|p|| _|r- r-t tdt}t|tr*t| | | g|R i |S )NlimitedFT)requestgroupfnkeyratemethod	incrementRATELIMIT_EXCEPTION_CLASS)getattrr	   r   r   r   
isinstancestrr   )r   argskwold_limitedratelimitedcls)blockr   r   r   r   r    b/var/www/newdalilibackend/backend/venv/lib/python3.10/site-packages/django_ratelimit/decorators.py_wrapped   s   
z.ratelimit.<locals>.decorator.<locals>._wrappedr   )r   r   r   r   r   r   r   )r   r   	decorator   s   zratelimit.<locals>.decoratorr   )r   r   r   r   r   r!   r   r    r   r
      s   )	functoolsr   django.confr   django.utils.module_loadingr   django_ratelimitr   r   django_ratelimit.exceptionsr   django_ratelimit.corer	   __all__r
   r   r   r   r   <module>   s    
