会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
市丸银
知行合一
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
57
58
59
60
61
62
63
64
65
···
100
下一页
2019年12月26日
flask-debugtoolbar
摘要: 具体用法看文档 http://www.pythondoc.com/flask-debugtoolbar/index.html 注意:static url地址: host:port/static/文件名
阅读全文
posted @ 2019-12-26 22:27 市丸银
阅读(192)
评论(0)
推荐(0)
2019年12月25日
flask模板 flask-bootstrap
摘要: 1、模板 a、block块中继承前面block块的内容,需要添加{{super()}} b、macro 宏: 作用:在模板中定义函数(定义函数->注意添加()->可以使用from 模板名称 import 函数名) 实际应用:单独创建一个html,用于定义macro 创建模板语言的函数,再使用{% f
阅读全文
posted @ 2019-12-25 22:31 市丸银
阅读(1289)
评论(0)
推荐(0)
2019年12月24日
flask cookie和session
摘要: 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 市丸银
阅读(236)
评论(0)
推荐(0)
sqlachemy查询对象转化成字典/json使用
摘要: https://www.cnblogs.com/sanduzxcvbnm/p/10220718.html
阅读全文
posted @ 2019-12-24 10:15 市丸银
阅读(187)
评论(0)
推荐(0)
pandas DF去重
摘要: 实例 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 市丸银
阅读(813)
评论(0)
推荐(0)
2019年12月22日
flask request和response
摘要: 一、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 市丸银
阅读(438)
评论(0)
推荐(0)
flask路由要点
摘要: 1、参数类型intfloatstringpath uuid<any(a, b): an> 枚举, an必须是any中的值2、多个url指向一个视图函数是可行的3、url_for('蓝图名字.函数名字', 变量名称=value) 注意:是蓝图的名字,不是变量的名字4、Flask的四大内置对象reque
阅读全文
posted @ 2019-12-22 21:49 市丸银
阅读(166)
评论(0)
推荐(0)
2019年12月21日
flask项目结构
摘要: 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 市丸银
阅读(401)
评论(0)
推荐(0)
__init__.py在导包中起到的作用
摘要: 说明:__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 市丸银
阅读(333)
评论(0)
推荐(0)
git 查看修改账号密码
摘要: 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 市丸银
阅读(8549)
评论(0)
推荐(0)
上一页
1
···
57
58
59
60
61
62
63
64
65
···
100
下一页
公告