|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /lib64/python2.7/site-packages/django/views/decorators/ |
Upload File : |
�
r�\c @ s2 d d l Z d d l m Z d � Z d � Z d S( i����N( t HttpRequestc 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 funct sensitive_variables_wrappert variables( s? /tmp/pip-install-XxeQeY/django/django/views/decorators/debug.pyR s ( t functoolst wraps( R ( R ( R R s? /tmp/pip-install-XxeQeY/django/django/views/decorators/debug.pyt decorator s $( ( R R
( ( R s? /tmp/pip-install-XxeQeY/django/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 sF t | t � s t d � � � r- � | _ n d | _ � | | | � S( Ns sensitive_post_parameters didn't receive an HttpRequest. If you are decorating a classmethod, be sure to use @method_decorator.R ( t
isinstanceR t AssertionErrort sensitive_post_parameters( t requestt argst kwargs( t
parameterst view( s? /tmp/pip-install-XxeQeY/django/django/views/decorators/debug.pyt! sensitive_post_parameters_wrapperA s ( R R ( R R ( R ( R s? /tmp/pip-install-XxeQeY/django/django/views/decorators/debug.pyR
@ s !( ( R R
( ( R s? /tmp/pip-install-XxeQeY/django/django/views/decorators/debug.pyR
) s
( R t django.httpR R R
( ( ( s? /tmp/pip-install-XxeQeY/django/django/views/decorators/debug.pyt <module> s #