Traceback (most recent call last):
文件“/home/lib/python3.6/site-packages/django/core/handlers/exception.py”,第 34 行,内部响应 = get_response(request)文件“/home/lib/python3.6/site-packages/django/core/handlers/base.py”,第 115 行,在 _get_response 中响应 = self.process_exception_by_middleware(e,request)文件“/home/lib/python3.6/site-packages/django/core/handlers/base.py”,第 113 行,在 _get_response 中响应 = wrapback_callback(request,*callback_args,**callback_kwargs)文件“/home/lib/python3.6/site-packages/django/views/decorators/csrf.py”,第 54 行,在 wrapped_view 中返回 view_func(*args,**kwargs)文件“/home/lib/python3.6/site-packages/django/views/generic/base.py”, 第 71 行,在视图中返回 self.dispatch(request、*args、**kwargs) 文件“/home/lib/python3.6/site-packages/rest_framework/views.py”, 第 505 行,在调度响应 = self.handle_exception(exc) 文件“/home/lib/python3.6/site-packages/rest_framework/views.py”, 第 465 行,在 handle_exception 中 self.raise_uncaught_exception(exc) 文件“/home/lib/python3.6/site-packages/rest_framework/views.py”, 第 476 行,在 raise_uncaught_exception 中引发 exc 文件“/home/lib/python3.6/site-packages/rest_framework/views.py”, 第 502 行,在调度响应 = handler(request、*args、 **kwargs)文件“/home/lib/python3.6/site-packages/rest_framework/decorators.py”,第 50 行,在处理程序中返回 func(*args,**kwargs)文件“/home/lib/python3.6/site-packages/django/views/decorators/csrf.py”,第 54 行,在 wrapping_view 中返回 view_func(*args,**kwargs)文件“/home/lib/python3.6/site-packages/django/views/generic/base.py”,第 71 行,在视图中返回 self.dispatch(request,*args,**kwargs)文件“/home/lib/python3.6/site-packages/rest_framework/views.py”,第 488 行,在调度请求 = self.initialize_request(request,*args,**kwargs)文件“/home/lib/python3.6/site-packages/rest_framework/views.py”, 第 392 行, 在 initialise_request parser_context=parser_context 文件“/home/lib/python3.6/site-packages/rest_framework/request.py”, 第 157 行, 在在里面
.格式(请求。班级。模块, 要求。班级。姓名) AssertionError:request
参数必须是 的实例django.http.HttpRequest
,而不是rest_framework.request.Request
。