Answers for "jsonresponse django"

1

import jsonresponse django

from django.http import JsonResponse
return JsonResponse({'key':'value'})
Posted by: Guest on June-15-2021
2

set http response content type django

reponse = HttpResponse(content)
response['Content-Type'] = 'application/json' # or application/text, etc.

# one-line usage
reponse = HttpResponse(content, content_type:'application/json')
Posted by: Guest on October-06-2020
1

httpresponse django

from django.http import HttpResponse
Posted by: Guest on July-01-2020
-1

jsonresponse django

from django.http import JsonResponse
return JsonResponse({'foo':'bar'})
Posted by: Guest on June-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language