Process_exception() hook in django middleware is called right after a view is called. It should return either a None or an HttpResponse object. if one wants to customized a view error, in django middle middleware, process_exception remains a global place to customize errors thrown from viewSet, templateView or GenericView. If the process_exception returns None, your django middleware will inhibit critical errors from any view throughout your django project
#django #middleware #DRF
josuekula.com/videos
Twitter: twitter.com/J_kuler
コメント