上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 67 下一页
摘要: 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 市丸银 阅读(200) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/sanduzxcvbnm/p/10220718.html 阅读全文
posted @ 2019-12-24 10:15 市丸银 阅读(153) 评论(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 市丸银 阅读(771) 评论(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 市丸银 阅读(387) 评论(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 市丸银 阅读(133) 评论(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 市丸银 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 说明:__init__.py这个文件本人使用频率不高 例子: __init__.py文件作用:初始化这个包 1、v1.py def vi(): return 'views' 2、views->__init__.py from .v1 import vi 3、test1.py from views i 阅读全文
posted @ 2019-12-21 22:45 市丸银 阅读(296) 评论(0) 推荐(0) 编辑
摘要: git config user.name 查看用户名 git config user.email 查看用户邮箱 修改用户名和邮箱的命令 git config --global user.name "Your_username"git config --global user.email "Your_ 阅读全文
posted @ 2019-12-21 17:32 市丸银 阅读(8476) 评论(0) 推荐(0) 编辑
摘要: 网址:https://pypi.org/project/Flask-Script/ 文档:https://flask-script.readthedocs.io/en/latest/ 1、安装 2、新建manager.py文件 3、导入Manager和app 4、代码 from flask_scri 阅读全文
posted @ 2019-12-20 22:10 市丸银 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 代码照旧 阅读全文
posted @ 2019-12-19 22:26 市丸银 阅读(311) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 67 下一页