o 3Ûøa ã@s(ddlZddlmZdd„Zdd„ZdS)éN)Ú HttpRequestcó0tˆƒdkrtˆdƒrtdƒ‚‡fdd„}|S)aŠ Indicate 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. Accept two forms: * 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 consider all variables are sensitive: @sensitive_variables() def my_function() ... érzzsensitive_variables() must be called to use it as a decorator, e.g., use @sensitive_variables(), not @sensitive_variables.cst ˆ¡‡‡‡fdd„ƒ‰ˆS)Ncs ˆrˆˆ_ndˆ_ˆ|i|¤ŽS)NÚ__ALL__)Úsensitive_variables)Ú func_argsÚ func_kwargs)ÚfuncÚsensitive_variables_wrapperÚ variables©ú?/usr/lib/python3/dist-packages/django/views/decorators/debug.pyr $szKsensitive_variables..decorator..sensitive_variables_wrapper©Ú functoolsÚwraps)r ©r )r r r Ú decorator#sz&sensitive_variables..decorator©ÚlenÚcallableÚ TypeError)r rr rr rs ÿ  rcr)a‹ Indicate 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. Accept two forms: * 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 consider all variables are sensitive: @sensitive_post_parameters() def my_view(request) ... rrzŒsensitive_post_parameters() must be called to use it as a decorator, e.g., use @sensitive_post_parameters(), not @sensitive_post_parameters.cst ˆ¡‡‡fdd„ƒ}|S)Ncs:t|tƒs Jdƒ‚ˆrˆ|_nd|_ˆ|g|¢Ri|¤ŽS)Nzsensitive_post_parameters didn't receive an HttpRequest. If you are decorating a classmethod, be sure to use @method_decorator.r)Ú isinstancerÚsensitive_post_parameters)ÚrequestÚargsÚkwargs)Ú parametersÚviewr r Ú!sensitive_post_parameters_wrapperNs ÿzWsensitive_post_parameters..decorator..sensitive_post_parameters_wrapperr)rr©r)rr rMs z,sensitive_post_parameters..decoratorr)rrr rr r/s ÿ r)rÚ django.httprrrr r r r Ús  )