コード例 #1
0
def _get_context():
    data = request.args
    sid = data.get('session')
    lang = data.get('lang', 'en')
    ret, response = get_context(sid, lang)
    return Response(json_encode({'ret': ret, 'response': response}),
                    mimetype="application/json")
コード例 #2
0
def _get_context():
    data = request.args
    sid = data.get('session')
    lang = data.get('lang', 'en')
    ret, _response = get_context(sid, lang)
    response = {}
    for k, v in _response.iteritems():
        if isinstance(v, basestring) or isinstance(v, unicode):
            response[k] = v
    return Response(json_encode({'ret': ret, 'response': response}),
                    mimetype="application/json")
コード例 #3
0
ファイル: run_server.py プロジェクト: linas/HEAD
def _get_context():
    data = request.args
    sid = data.get('session')
    ret, response = get_context(sid)
    return Response(json_encode({'ret': ret, 'response': response}),
                    mimetype="application/json")