随笔分类 -  开发框架-flask

摘要:用flask开发web网站时,遇到下面的报错 sqlalchemy.exc.ArgumentError: Mapper mapped class Result->result could not assemble any primary key 解决:按照报错字面的意思,和主键有关,最后发现是我要操 阅读全文
posted @ 2021-04-05 20:21 范若若 阅读(1997) 评论(0) 推荐(1)
摘要:在谷歌浏览器中设置 F12 --> 设置(上图中红框已标出) --> Perferences --> Sources 禁用以下两项即可: Enable JavaScript source maps. Enable CSS source maps. 阅读全文
posted @ 2021-04-04 19:28 范若若 阅读(7481) 评论(0) 推荐(0)
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> </head><body> <h1>使用字典变量:{{mydict["type"]}}</h1> <h1>使用列表变量:{{mylist[0]}}</h1> <h1>使用普通函数 阅读全文
posted @ 2021-04-04 16:59 范若若 阅读(878) 评论(0) 推荐(0)
摘要:使用 jsonify 时,返回的 http response 的 Content-Type 是:Content-Type: application/json 使用json.dumps时,Content-Type则是:Content-Type: text/html; charset=utf-8 其他基 阅读全文
posted @ 2021-04-04 15:58 范若若 阅读(222) 评论(0) 推荐(0)