DRF之request

发布时间 2023-04-20 14:30:50作者: 阿勒泰的鱼
1. request.data
post请求内的数据都放在了request.data

2.request.query_parme
get 请求内携带的参数都放在了request.query_parms

3. request.FILES
def FILES(self):
# Leave this one alone for backwards compat with Django's request.FILES
# Different from the other two cases, which are not valid property
# names on the WSGIRequest class.
if not _hasattr(self, '_files'):
self._load_data_and_files()
return self._files
4.APIView分析
4.1 as_view 方法分析
4.2 dispatch 方法分析
4.3 initialize_request 方法分析
4,4 initial 方法分析