2👍
✅
I think you should call the failure()
function so that you actually have an HttpResponse
returned from the wrapping decorator. Replace:
return failure
with:
return failure()
And, the same goes for the view
, call it:
return view(request, *args, **kwargs)
Source:stackexchange.com