コード例 #1
0
def ajax_recommentation_in_sensitive_list():
    date = request.args.get('date', '') # 2013-09-01
    results = recommend_in_sensitive(date)
    if results:
        return json.dumps(results)
    else:
        return json.dumps([])
コード例 #2
0
def ajax_recommentation_in_sensitive_list():
    date = request.args.get('date', '')  # 2013-09-01
    """
    ts = datetime2ts(ts2datetime(time.time()-6*24*3600))
    input_ts = datetime2ts(date)
    if input_ts < ts:
        return '0'
    else:
        results = recommend_in_sensitive(date)
    """
    results = recommend_in_sensitive(date)
    if results:
        return json.dumps(results)
    else:
        return json.dumps([])
コード例 #3
0
def ajax_recommentation_in_sensitive_list():
    date = request.args.get('date', '') # 2013-09-01
    """
    ts = datetime2ts(ts2datetime(time.time()-6*24*3600))
    input_ts = datetime2ts(date)
    if input_ts < ts:
        return '0'
    else:
        results = recommend_in_sensitive(date)
    """
    results = recommend_in_sensitive(date)
    if results:
        return json.dumps(results)
    else:
        return json.dumps([])