请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

'CSRFCheck' object has no attribute 'process_request'

WrappedAttributeError at /goods/
‘CSRFCheck’ object has no attribute 'process_request’
Request Method: GET
Request URL: http://127.0.0.1:8000/goods/
Django Version: 1.11.3
Exception Type: WrappedAttributeError
Exception Value:
‘CSRFCheck’ object has no attribute 'process_request’
Exception Location: E:\Develop_Project\virtualenvwrapper\Envs\VueShop\lib\site-packages\rest_framework\authentication.py in enforce_csrf, line 140
Python Executable: E:\Develop_Project\virtualenvwrapper\Envs\VueShop\Scripts\python.exe
Python Version: 3.6.0
Python Path:
[‘E:\Develop_Project\PycharmProjects\MxShop\extra_apps’,
‘E:\Develop_Project\PycharmProjects\MxShop\apps’,
‘E:\Develop_Project\PycharmProjects\MxShop’,
‘E:\Develop_Project\PycharmProjects\MxShop’,
‘E:\Develop_Project\PycharmProjects\MxShop’,
‘E:\Develop_Project\PycharmProjects\MxShop\apps’,
‘E:\Develop_Project\PycharmProjects\MxShop\extra_apps’,
‘E:\Develop_Project\virtualenvwrapper\Envs\VueShop\Scripts\python36.zip’,
‘E:\Develop_Project\virtualenvwrapper\Envs\VueShop\DLLs’,
‘E:\Develop_Project\virtualenvwrapper\Envs\VueShop\lib’,
‘E:\Develop_Project\virtualenvwrapper\Envs\VueShop\Scripts’,
‘D:\python\python36\Lib’,
‘D:\python\python36\DLLs’,
‘E:\Develop_Project\virtualenvwrapper\Envs\VueShop’,
‘E:\Develop_Project\virtualenvwrapper\Envs\VueShop\lib\site-packages’,
‘D:\Program Files\PyCharm 2018.2.4\helpers\pycharm_matplotlib_backend’]
Server time: 星期四, 7 三月 2019 23:39:33 +0800

正在回答 回答被采纳积分+3

1回答

Ethreal 2019-03-08 09:57:40

注掉 https://img1.sycdn.imooc.com//szimg/5c81cbfb00013b6b16900106.jpg  这个中间件

0 回复 有任何疑惑可以回复我~
  • 提问者 慕粉1256064012 #1
    还是不行
    TypeError at /goods/
    get() takes 1 positional argument but 2 were given
    Request Method:	GET
    Request URL:	http://127.0.0.1:8000/goods/
    Django Version:	1.11.3
    Exception Type:	TypeError
    Exception Value:	
    get() takes 1 positional argument but 2 were given
    Exception Location:	E:\Develop_Project\virtualenvwrapper\Envs\VueShop\lib\site-packages\rest_framework\views.py in dispatch, line 492
    Python Executable:	E:\Develop_Project\virtualenvwrapper\Envs\VueShop\Scripts\python.exe
    Python Version:	3.6.0
    回复 有任何疑惑可以回复我~ 2019-03-08 20:54:14
  • bobby 回复 提问者 慕粉1256064012 #2
    你加我qq 442421039 我看看
    回复 有任何疑惑可以回复我~ 2019-03-10 12:18:00
  • 提问者 慕粉1256064012 回复 bobby #3
    已经可以了,之前好像是get()少了一个参数
    回复 有任何疑惑可以回复我~ 2019-03-21 23:03:53
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信