title: Django Response Middleware: Get name of view which created the response
body: <p>I have simple middleware which checks if the HTML in the response is valid or not.</p>
  
  <p>If the HTML is not valid an html is not valid" exception gets raised in development systems.</p>
  
  <p>Up to now the xception contains the URL and the validation error.</p>
  
  <p>Then the developer sees the URL in the well known yellow and gray django debug page.</p>
  
  <p>Maybe I am blind, but if I look at the django debug page, I can't see which of my methods/views created the content with the broken html.</p>
  
  <p>Is there a way to add more information to the "html is not valid" exception, to assist the developer? The developer should find the relevant method/view easier.</p>