def postd(): data = request.body datas = data.read().decode('utf-8') print(datas) insertdb(datas) makehtml.makehtml() return "Post OK\n"
def postd(): data=request.body datas=data.read().decode('utf-8') print(datas) insertdb(datas) makehtml.makehtml() return "Post OK\n"
def index(): #insertdb2() return makehtml.makehtml()
@app.route('/test') def index(): #insertdb2() return makehtml.makehtml() #return "hello kitty ? ?" @app.post('/send') def postd(): data=request.body datas=data.read().decode('utf-8') print(datas) insertdb(datas) makehtml.makehtml() return "Post OK\n" @app.post('/commit') def commit(): print("This is the github.com post me some mmessage:") data=request.body datas=data.read() print(datas) return "Post OK\n" if __name__=='__main__': #insertdb2() makehtml.makehtml() #run(server="paste",host="0.0.0.0") #run(server="gevent",host="0.0.0.0")