摘要: 1.后端如何得到前端数据 1)如果前端提交的方法为POST: 后端接收时要写methods=[‘GET’,‘POST’] xx=request.form.get(xx); xx=request.form[’‘xx’] 2)如果是GET xx=request.args.get(xx) 2.后端向前端传 阅读全文
posted @ 2021-02-26 20:00 zae 阅读(2955) 评论(0) 推荐(0) 编辑
摘要: json数据格式 值用[x1,x2,..]表示, 键值对用{x:,y:} json读写 json文件与dict 读取json: import json f = open('static/data/newsTest.json','rb') data = json.load(f) 存为json: wit 阅读全文
posted @ 2021-02-26 01:21 zae 阅读(272) 评论(0) 推荐(0) 编辑