📜  如何在 django 响应中发送 json - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:02.486000             🧑  作者: Mango

代码示例1
from django.http import JsonResponse

def someviewfunction(request):
  ...
  return JsonResponse({'foo':'bar'})