do not set http status code to json status, this only causes annoying error messages in debug consoles

This commit is contained in:
j 2011-09-29 00:47:22 +02:00
parent 10e1291d87
commit 0ff79d432f

View file

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