摘要:
一,浏览器仿问服务器 二,产生request对像 三、调用中间件中的process_request 四、通过url找到对应视图 五、调用中间件中的process_views 六、调用process_response 返回浏览器 0、__init__(self) 服务器响应第一个请求的时候调用1、pr 阅读全文
摘要:
# 适用于django2.0以上版本from django.http import HttpResponsefrom django.utils.deprecation import MiddlewareMixin # django2.0# 中间件类class BlockedIPSmiddleware 阅读全文