debug needs custom json hooks too

This commit is contained in:
j 2011-03-25 11:39:31 +01:00
parent d35a1c721c
commit 618ad7ed3f

View file

@ -28,7 +28,7 @@ def render_to_json_response(dictionary, content_type="text/json", status=200):
content_type = "text/javascript"
indent = 2
if settings.JSON_DEBUG:
print json.dumps(dictionary, indent=2)
print json.dumps(dictionary, indent=2, default=_to_json)
if 'status' in dictionary and 'code' in dictionary['status']:
status = dictionary['status']['code']