django - Should the response argument to `process_response` always be a subclass of HttpResponse? -


question in title. found when our views raise http404 exception, response argument our process_response methods exception instead of httpresponse.

is correct? need account such cases when writing middleware or misconfigured?

well, if looks duck, , quacks duck...

but yes, process_response() method should receive httpresponse subclass, not exception. if middleware receives exception, caused returning http404, instead of raising it, in view or previous middleware method.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -