def to_json_response(data, func_name=None, use_iframe=False):
    data = json_encode(data)
    # as of dojo version 1.2.0, prepending {}&&\n is the most secure way!!!
    # for dojo version < 1.2.0 you have to set DOJANGO_DOJO_SECURE_JSON = False
    # in your settings file!
    if settings.DOJO_SECURE_JSON:
        data = "{}&&\n" + data
    # don't wrap it into a function, if we use an iframe
    if func_name and not use_iframe:
        data = "%s(%s)" % (func_name, data)
    mimetype = "application/json"
    if use_iframe:
        mimetype = "text/html"
        data = render_to_string("dojango/json_iframe.html", {'json_data': data})
    ret = HttpResponse(data, mimetype=mimetype+"; charset=%s" % settings.DEFAULT_CHARSET)
    # The following are for IE especially
    ret['Pragma'] = "no-cache"
    ret['Cache-Control'] = "must-revalidate"
    ret['If-Modified-Since'] = str(datetime.datetime.now())
    return ret
Return the version of the selected database.
dataset/ETHPy150Open klipstein/dojango/dojango/util/__init__.py/to_json_response--crossover with--dataset/ETHPy150Open dvarrazzo/pgxnclient/pgxnclient/commands/install.py/LoadUnload.get_pg_version