'QueryDict' object is not callable

问题描述:在Django项目中,使用jquery $.get前后端通信时,出现此错误。
原因: 在后端视图中提取异步请求中的参数时,使用了 request.get**(“location”)* 形式的语句,导致出错,因为 . g e t j j s o n .get(url*,{ “key” : “value” }**, func ),跟字典差不多,提取其 中参数使用的是字典的访问方式。
解决办法: 改为 requset.get**[“location”]**即可.

猜你喜欢

转载自blog.csdn.net/Noob_coder_JZ/article/details/82532613