ó
Ūâ0_c           @   sF   d  d l  m Z d  d l m Z d  d l m Z d   Z d   Z d S(   iĸĸĸĸ(   t   wraps(   t   patch_vary_headers(   t   available_attrsc             s     f d   } | S(   s  
    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    d t       f d    } | S(   Nt   assignedc             s      |  |   } t  |   | S(   N(   R   (   t   argst   kwargst   response(   t   funct   headers(    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/views/decorators/vary.pyt
   inner_func   s    (   R    R   (   R   R	   (   R   (   R   s>   /tmp/pip-unpacked-wheel-BAJOf3/django/views/decorators/vary.pyt	   decorator   s    *(    (   R   R
   (    (   R   s>   /tmp/pip-unpacked-wheel-BAJOf3/django/views/decorators/vary.pyt   vary_on_headers   s    c            s+   t    d t      f d    } | S(   sŲ   
    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):
            ...
    R   c             s      |  |   } t  | d  | S(   Nt   Cookie(   R   (   R   (   R   R   R   (   R   (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/views/decorators/vary.pyR	   %   s    (   R    R   (   R   R	   (    (   R   s>   /tmp/pip-unpacked-wheel-BAJOf3/django/views/decorators/vary.pyt   vary_on_cookie   s    	'N(   t	   functoolsR    t   django.utils.cacheR   t   django.utils.decoratorsR   R   R   (    (    (    s>   /tmp/pip-unpacked-wheel-BAJOf3/django/views/decorators/vary.pyt   <module>   s   	