MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / make_json_response

Function make_json_response

web/pgadmin/utils/ajax.py:66–84  ·  view source on GitHub ↗

Create a HTML response document describing the results of a request and containing the data.

(
        success=1, errormsg='', info='', result=None, data=None, status=200
)

Source from the content-addressed store, hash-verified

64
65
66def make_json_response(
67 success=1, errormsg='', info='', result=None, data=None, status=200
68):
69 """Create a HTML response document describing the results of a request and
70 containing the data."""
71 doc = dict()
72 doc['success'] = success
73 doc['errormsg'] = errormsg
74 doc['info'] = info
75 doc['result'] = result
76 doc['data'] = data
77
78 return Response(
79 response=json.dumps(doc, cls=DataTypeJSONEncoder,
80 separators=(',', ':')),
81 status=status,
82 mimetype="application/json",
83 headers=get_no_cache_header()
84 )
85
86
87def make_response(response=None, status=200):

Callers 15

limit_host_addrFunction · 0.90
dispatch_requestMethod · 0.90
childrenMethod · 0.90
childrenMethod · 0.90
get_nodesFunction · 0.90
check_corrupted_db_fileFunction · 0.90
check_master_passwordFunction · 0.90
reset_master_passwordFunction · 0.90
change_passwordFunction · 0.90
forgot_passwordFunction · 0.90
deleteMethod · 0.90

Calls 1

get_no_cache_headerFunction · 0.85

Tested by 1

runTestMethod · 0.72