

def json_response(x, content_type='application/json'):
    s = py2js(x)
    '\n    Theroretically we should send content_type=\'application/json\'\n    (http://stackoverflow.com/questions/477816/the-right-json-content-type),\n    but "File uploads are not performed using Ajax submission, \n    that is they are not performed using XMLHttpRequests. (...) \n    If the server is using JSON to send the return object, then \n    the Content-Type header must be set to "text/html" in order \n    to tell the browser to insert the text unchanged into the \n    document body." \n    (http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.BasicForm)\n    See 20120209.\n    '
    return http.HttpResponse(s, content_type=x)

dataset/ETHPy150Open lsaffre/lino/lino/core/views.py json_response/VarMisuse@32/270 `content_type`->`x`