这是我使用商品名称返回价格的代码:
@app.route('/buying',methods = ['POST'])
def buyShop():
rec = request.form
json_msg = {
'item' : rec['item']
}
result = mycol.find_one(json_msg)
if result is None:
return 'No data found'
else:
return ??