do not set http status code to json status, this only causes annoying error messages in debug consoles
This commit is contained in:
parent
10e1291d87
commit
0ff79d432f
1 changed files with 0 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue