ó
I()Qc           @   s"   d  d l  Z  d „  Z d „  Z d S(   iÿÿÿÿNc             s   ‡  f d †  } | S(   s§  
    Indicates which variables used in the decorated function are sensitive, so
    that those variables can later be treated in a special way, for example
    by hiding them when logging unhandled exceptions.

    Two forms are accepted:

    * with specified variable names:

        @sensitive_variables('user', 'password', 'credit_card')
        def my_function(user):
            password = user.pass_word
            credit_card = user.credit_card_number
            ...

    * without any specified variable names, in which case it is assumed that
      all variables are considered sensitive:

        @sensitive_variables()
        def my_function()
            ...
    c            s(   t  j ˆ ƒ ‡  ‡ ‡ f d †  ƒ ‰  ˆ  S(   Nc             s(   ˆ r ˆ ˆ  _  n	 d ˆ  _  ˆ |  | Ž  S(   Nt   __ALL__(   t   sensitive_variables(   t	   func_argst   func_kwargs(   t   sensitive_variables_wrappert	   variablest   func(    s6   ../Django//lib/python/django/views/decorators/debug.pyR      s    	(   t	   functoolst   wraps(   R   (   R   (   R   R   s6   ../Django//lib/python/django/views/decorators/debug.pyt	   decorator   s    $(    (   R   R	   (    (   R   s6   ../Django//lib/python/django/views/decorators/debug.pyR      s    	c             s   ‡  f d †  } | S(   s¨  
    Indicates which POST parameters used in the decorated view are sensitive,
    so that those parameters can later be treated in a special way, for example
    by hiding them when logging unhandled exceptions.

    Two forms are accepted:

    * with specified parameters:

        @sensitive_post_parameters('password', 'credit_card')
        def my_view(request):
            pw = request.POST['password']
            cc = request.POST['credit_card']
            ...

    * without any specified parameters, in which case it is assumed that
      all parameters are considered sensitive:

        @sensitive_post_parameters()
        def my_view(request)
            ...
    c            s%   t  j ˆ  ƒ ‡  ‡ f d †  ƒ } | S(   Nc            s+   ˆ r ˆ |  _  n	 d |  _  ˆ  |  | | Ž S(   NR    (   t   sensitive_post_parameters(   t   requestt   argst   kwargs(   t   viewt
   parameters(    s6   ../Django//lib/python/django/views/decorators/debug.pyt!   sensitive_post_parameters_wrapper?   s    	(   R   R   (   R   R   (   R   (   R   s6   ../Django//lib/python/django/views/decorators/debug.pyR	   >   s    !(    (   R   R	   (    (   R   s6   ../Django//lib/python/django/views/decorators/debug.pyR
   '   s    	(   R   R   R
   (    (    (    s6   ../Django//lib/python/django/views/decorators/debug.pyt   <module>   s   	#