上一页 1 ··· 54 55 56 57 58 59 60 61 62 ··· 97 下一页
摘要: python manage.py inspectdb > model.py 1、先配置数据库 2、执行上面的命令 3、根据注释提示,修改model 阅读全文
posted @ 2019-12-28 21:52 市丸银 阅读(281) 评论(0) 推荐(0)
摘要: sqlite文件缺失 下载地址 https://sqlite.org/download.html https://blog.csdn.net/xuzhexing/article/details/90550105 阅读全文
posted @ 2019-12-28 15:09 市丸银 阅读(149) 评论(0) 推荐(0)
摘要: 具体用法看文档 http://www.pythondoc.com/flask-debugtoolbar/index.html 注意:static url地址: host:port/static/文件名 阅读全文
posted @ 2019-12-26 22:27 市丸银 阅读(151) 评论(0) 推荐(0)
摘要: 1、模板 a、block块中继承前面block块的内容,需要添加{{super()}} b、macro 宏: 作用:在模板中定义函数(定义函数->注意添加()->可以使用from 模板名称 import 函数名) 实际应用:单独创建一个html,用于定义macro 创建模板语言的函数,再使用{% f 阅读全文
posted @ 2019-12-25 22:31 市丸银 阅读(1257) 评论(0) 推荐(0)
摘要: 1、cookie # 设置 response=Response('hello') response.set_cookie(key, value) return response # 获取 request.cookie.get(key) 2、session flask session默认保存到cook 阅读全文
posted @ 2019-12-24 23:16 市丸银 阅读(206) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/sanduzxcvbnm/p/10220718.html 阅读全文
posted @ 2019-12-24 10:15 市丸银 阅读(163) 评论(0) 推荐(0)
摘要: 实例 import pandas as pd data=pd.DataFrame({'产品':['A','A','A','A'],'数量':[50,50,30,30]}) 去重 data.drop_duplicates() # 去除重复数据 data.drop_duplicates().reset_ 阅读全文
posted @ 2019-12-24 09:21 市丸银 阅读(779) 评论(0) 推荐(0)
摘要: 一、request 1、获取远程的iprequest.remote_addr 作用:ip检测网站 2、request.args GET请求参数,不止适用于get请求 获取参数 request.args.get(key) request.args[key] 获取多个values request.get 阅读全文
posted @ 2019-12-22 22:11 市丸银 阅读(401) 评论(0) 推荐(0)
摘要: 1、参数类型intfloatstringpath uuid<any(a, b): an> 枚举, an必须是any中的值2、多个url指向一个视图函数是可行的3、url_for('蓝图名字.函数名字', 变量名称=value) 注意:是蓝图的名字,不是变量的名字4、Flask的四大内置对象reque 阅读全文
posted @ 2019-12-22 21:49 市丸银 阅读(147) 评论(0) 推荐(0)
摘要: 1、项目结构 -app - static文件夹 - templates文件夹 - views文件夹 - 蓝图的视图 user - __init__.py(from .user import user_bp 注册蓝图,使用懒加载,init_view(app)) - models - ext.py 初始 阅读全文
posted @ 2019-12-21 23:19 市丸银 阅读(379) 评论(0) 推荐(0)
上一页 1 ··· 54 55 56 57 58 59 60 61 62 ··· 97 下一页