Django 使用 jquery get 报错 the server responded with a status of 500 解决办法

完整报错以及解决办法

完整报错如下:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
在这里插入图片描述
使用jquery get方法发出ajax请求并从服务端返回json数据对象在前后端代码没问题的情况下可以检查一下有没有引入模块

from django.http import JsonResponse

重新刷新 就发现可以用了

猜你喜欢

转载自blog.csdn.net/weixin_45827221/article/details/106752752