源码解析
1.刚开始会获取settings.py里配置的中间件 reversed反向
for middleware_path in reversed(settings.MIDDLEWARE):
2.process_view 添加到<视图中间件>列表前面 3.process_template_response 添加到<模板中间件>列表后面 4.process_exception 添加到<异常中间>件列表后面
if hasattr(mw_instance, "process_view"):
# 1. 中间件存在方法proce