a
    Ê[ÙfA  ã                   @   s,   d dl mZ d dlmZ dd„ Zdd„ ZdS )é    ©Úwraps©Úpatch_vary_headersc                     s   ‡ fdd„}|S )a  
    A view decorator that adds the specified headers to the Vary header of the
    response. Usage:

       @vary_on_headers('Cookie', 'Accept-language')
       def index(request):
           ...

    Note that the header names are not case-sensitive.
    c                    s   t ˆ ƒ‡ ‡fdd„ƒ}|S )Nc                     s   ˆ | i |¤Ž}t |ˆƒ |S )Nr   ©ÚargsÚkwargsÚresponse)ÚfuncÚheaders© únC:\Users\91910\OneDrive\Desktop\vts_admin_rebuild-master\vts\Lib\site-packages\django/views/decorators/vary.pyÚ
inner_func   s    
z6vary_on_headers.<locals>.decorator.<locals>.inner_funcr   ©r
   r   ©r   ©r
   r   Ú	decorator   s    z"vary_on_headers.<locals>.decoratorr   )r   r   r   r   r   Úvary_on_headers   s    	r   c                    s   t ˆ ƒ‡ fdd„ƒ}|S )zÙ
    A view decorator that adds "Cookie" to the Vary header of a response. This
    indicates that a page's contents depends on cookies. Usage:

        @vary_on_cookie
        def index(request):
            ...
    c                     s   ˆ | i |¤Ž}t |dƒ |S )N)ÚCookier   r   r   r   r   r   (   s    
z"vary_on_cookie.<locals>.inner_funcr   r   r   r   r   Úvary_on_cookie   s    
r   N)Ú	functoolsr   Zdjango.utils.cacher   r   r   r   r   r   r   Ú<module>   s   