django return httpresponse json code example Example: jsonresponse django from django.http import JsonResponse return JsonResponse({'foo':'bar'})