0
考慮以下視圖功能:裝飾:如何獲得原函數變量
@validate_credentials
def validate_user(request):
return HttpResponse('OK')
我將如何獲得在包裝中值request.GET中?
def validate_credentials(view_function):
def wrapped_view(*args, **kwargs):
# request = ?
return view_function(*args, **kwargs)
return wrapped_view