会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
pythoner_wl
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
15
16
17
18
19
20
21
22
23
···
34
下一页
2020年8月28日
归并算法——python实现
摘要: # 不断地拆分,直到长度为 1 def d(ll): len_l = len(ll) print(len_l) if len_l > 1: left = 0 right = len_l - 1 mid = len_l // 2 l_left = ll[left:mid] l_right = ll[m
阅读全文
posted @ 2020-08-28 12:45 pythoner_wl
阅读(143)
评论(0)
推荐(0)
2020年8月27日
Flask——中间件,蓝图
摘要: 中间件(跟django中间件完全不一样) from flask import Flask app = Flask(__name__) @app.route('/') def index(): return 'Hello World!' # 模拟中间件 class Md(object): def __
阅读全文
posted @ 2020-08-27 19:29 pythoner_wl
阅读(182)
评论(0)
推荐(0)
2020年8月26日
导出项目环境 requiredments
摘要: 导出项目环境 requiredments 1)进入本地项目根目录 >: cd 项目根目录 方式一: 2)本地导出项目环境 >: pip3 freeze > packages.txt 3)如果环境中有特殊的安装包,需要处理一下xadmin packages.txt中的 xadmin==2.0.1 要被
阅读全文
posted @ 2020-08-26 20:01 pythoner_wl
阅读(258)
评论(0)
推荐(0)
Flask——路由正则,Request方法,Response方法,cookies,session,闪现,请求扩展
摘要: 路由支持正则 #1 写类,继承BaseConverter #2 注册:app.url_map.converters['regex'] = RegexConverter #3 使用:@app.route('/index/<regex("\d+"):nid>') 正则表达式会当作第二个参数传递到类中 f
阅读全文
posted @ 2020-08-26 19:56 pythoner_wl
阅读(170)
评论(0)
推荐(0)
2020年8月25日
Flask——路由,jinja2,三板斧,前端数据传输,反向解析,配置文件,转换器,路由本质,CBV
摘要: flask 项目 from flask import Flask,request app=Flask(__name__) @app.route('/') def index(): print(request.path) return 'hello world' if __name__ == '__m
阅读全文
posted @ 2020-08-25 20:17 pythoner_wl
阅读(360)
评论(0)
推荐(0)
2020年8月24日
Linux——权限,二进制安装,进程管理,系统服务
摘要: 基本权限chmod 1 rwx r-x r-x 属主(文件所有者) 属组权限 其他人权限 2 权限详解 r:read写权限 w: write写权限 x:可执行 3 修改权限 7=4(r)+2(w)+1(x) chmod 777 文件夹/文件 软件管理之二进制安装 1 会了yum安装,为什么还要会二进
阅读全文
posted @ 2020-08-24 19:04 pythoner_wl
阅读(175)
评论(0)
推荐(0)
echarts 使用
摘要: <template> <div> <div id="myChart" style="width: 1000px;height: 400px;" class="my-modal-parent"></div> </div> </template> <script> import echarts from
阅读全文
posted @ 2020-08-24 09:10 pythoner_wl
阅读(102)
评论(0)
推荐(0)
Celery 使用
摘要: celery.py from celery import Celery from celery.schedules import crontab broker = 'redis://127.0.0.1:6379/1' # broker任务队列 backend = 'redis://127.0.0.1
阅读全文
posted @ 2020-08-24 09:07 pythoner_wl
阅读(120)
评论(0)
推荐(0)
echarts 图表没有渲染
摘要: echarts 图表没有渲染 数据改变,图表没有渲染。解决:重新 setOption 更新数据即可 margin 的 auto 参数设置之前,标签一定要有宽度,否则,没效果
阅读全文
posted @ 2020-08-24 09:01 pythoner_wl
阅读(1183)
评论(0)
推荐(0)
cookie 跨域 和 drf 之 csrf
摘要: cookie跨域问题 cookie跨域问题:cookie必须同域才能共享 解决:把cookie信息,放请求信息中,手动带过去 drf 之 csrf 问题:axios post请求 csrf 前后端分离,通常不用csrf,因为我们自己的校验方法 然后,restfulframework as_view
阅读全文
posted @ 2020-08-24 08:58 pythoner_wl
阅读(268)
评论(0)
推荐(0)
上一页
1
···
15
16
17
18
19
20
21
22
23
···
34
下一页
公告