def asking_borowers_full_name(): if ('msg' in request.args): borrowers_name_asking_msg = request.args['msg'] post_data_lead_create.update({"name": borrowers_name_asking_msg}) borrowers_name_asking_msg_status = cs.borrowers_name_asking(borrowers_name_asking_msg) conversation_list_history.append(borrowers_name_asking_msg_status) # db_handler = mongo.db.chathistory # db_handler.insert({"request_user_id": request_user_id, "conversation": conversation_list_history, # "time": now_india.strftime(fmt)}) # db_handler.update({"request_user_id": request_user_id}, { # '$set': {"request_user_id": request_user_id, "conversation": conversation_list_history, "time": now_india.strftime(fmt)}, # "$currentDate": {"lastModified": True}}, upsert=True) #print post_data_lead_create resp = Response(borrowers_name_asking_msg_status, status=200, mimetype='application/json') return resp