Created
November 26, 2014 21:49
-
-
Save adrienlachaize/e1caa489bad8a96629c6 to your computer and use it in GitHub Desktop.
Wonderfull HTTP response to json format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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