webReco.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:caly-recommend-system 作者: CalyFactory 项目源码 文件源码
def customEvent(): 
    event_name = request.args['eventName']  
    location = request.args['location']
    start_dt = request.args['startDt']
    end_dt = request.args['endDt']
    event_hashkey = utils.make_hashkey("salttt");

    if len(event_name) == 0:
        event_name = None
    if len(location) == 0:
        location = None

    db_manager.query(
            """
            INSERT INTO EVENT  
            (event_hashkey,calendar_hashkey,event_id,summary,start_dt,end_dt,location) 
            VALUES 
            (%s, 'admin_calendar_hashkey','admin_event_id', %s, %s, %s, %s) 
            """,
            (event_hashkey,event_name,start_dt,end_dt,location)                         
    )
    reco_maestro = recoMaestro.RecoMaestro( account_hashkey = 'admin_account_hashkey', switchExtractor = True)  


    return json.dumps(reco_maestro.result_final)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号