Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wonderfull HTTP response to json format
import json
from django.http import HttpResponse
def json_responder(**kwargs):
"""
Return a HTTP response to json format
"""
return HttpResponse(json.dumps(kwargs), content_type="application/json")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.