I'm trying to make a Django function for JSON serializing something and returning it in an HttpResponse
object.
def json_response(something):
data = serializers.serialize("json", something)
return HttpResponse(data)
I'm using it like this:
return json_response({ howdy : True })
But I get this error:
"bool" object has no attribute "_meta"
Any ideas?
EDIT: Here is the traceback: