def async_legacy_get_response_dj_1_10(self, request):
"""
Apply process_request() middleware and call the main _get_response(),
if needed. Used only for legacy MIDDLEWARE_CLASSES.
"""
response = None
# Apply request middleware
for middleware_method in self._request_middleware:
response = middleware_method(request)
if isawaitable(response):
response = await response
if response:
break
if response is None:
response = await self._get_response_inner_dj_1_10(request)
return response
# This function is protected under the Django BSD 3-Clause licence
# This function is reproduced under the terms of the Django Licence
# See DJANGO_LICENCE in this source code repository
sanic_application.py 文件源码
python
阅读 31
收藏 0
点赞 0
评论 0
评论列表
文章目录