In my Django application I want to keep track of whether a response has been sent to the client successfully. I am well aware that there is no \"watertight\" way in a connec
I suppose when talking about middleware you are thinking about the middleware's process_request method, but there's also a process_response method that is called when the HttpResponse object is returned. I guess that will be the latest moment where you can find a hook that you can use.
Furthermore there's also a request_finished signal being fired.