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
Post a Comment