[Answered ]-Django's CsrfViewMiddleware fails in conjunction with response generated by middleware

2👍

You can manually run something like:

CsrfViewMiddleware.process_view(request, lambda: your_response, [], {})

P.S. I think it’s better to use handler404 to catch 404’s

👤ilvar

Leave a comment