Esempio n. 1
0
def ajax_location():
    uid = request.args.get("uid", "")
    uid = str(uid)
    now_ts = time.time()
    # test
    now_ts = test_time
    results = search_location(now_ts, uid)
    if results:
        return json.dumps(results)
    else:
        return None
Esempio n. 2
0
def ajax_location():
    uid = request.args.get('uid', '')
    uid = str(uid)
    time_type = request.args.get('time_type', '') # type = day; week; month
    #run_type
    if RUN_TYPE == 1:
        now_ts = time.time()
    else:
        now_ts = test_time - DAY
    results = search_location(now_ts, uid, time_type)
    
    return json.dumps(results)
Esempio n. 3
0
def ajax_location():
    uid = request.args.get('uid', '')
    uid = str(uid)
    time_type = request.args.get('time_type', '')  # type = day; week; month
    #run_type
    if RUN_TYPE == 1:
        now_ts = time.time()
    else:
        now_ts = test_time - DAY
    results = search_location(now_ts, uid, time_type)

    return json.dumps(results)