上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页
摘要: django HttpResponse和JsonResponse from django.http import HttpResponse, JsonResponse # JsonResponse参数传字典,内部对字典进行处理,返回json串 def stu(request): data = {'m 阅读全文
posted @ 2019-10-27 22:23 RainBol 阅读(303) 评论(0) 推荐(0) 编辑
摘要: django几种自带的几种模块 分页 # 导入分页 from django.core.paginator import Paginator # 专门做分页的 le = list(range(100)) # 对整个分页做操作 page_obj = Paginator(le, 20) # 参数一为一个l 阅读全文
posted @ 2019-10-27 20:53 RainBol 阅读(194) 评论(0) 推荐(0) 编辑
摘要: markdown格式最近比较常用,可以记笔记,写板书,写日志报告等,在这里我用vs code做演示,下载插件markdownlint使用,下面左边是文本格式,右边是md文件渲染的格式样式 # 主标题 - 二级标题 1.xxx 2.xxxx 3.xxxxx - 二级标题 # 主标题 ## 二级标题 # 阅读全文
posted @ 2019-10-25 11:46 RainBol 阅读(278) 评论(0) 推荐(1) 编辑
摘要: autohotkey简称ahk 它是一款轻量级的脚本语言文件,它可以干任何事情,如做dnf的连发脚本,类似按键精灵的自动化点击,按键自动打开文件一系列事情,文件需要按照ahk自己的语言,实现自定义的脚本宏 https://www.autohotkey.com/ 下载 http://ahkcn.sou 阅读全文
posted @ 2019-10-24 16:00 RainBol 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 之前用nodepad++,sublime text3,ultraedit,最近上手微软的vsc感觉上手还行,如果没有pycharm照样可以使用它 https://code.visualstudio.com/ 下载最新的版本 修改vsc软件变成中文 方法1.点下方的小方块 输入@category:"l 阅读全文
posted @ 2019-10-24 15:44 RainBol 阅读(11252) 评论(0) 推荐(0) 编辑
摘要: django的ORM操作 之前我们知道了models.py这个文件,这个文件是用来读取数据结构的文件,每次操作数据时都走这个模块 常用字段 AutoField int自增列,必须填入参数 primary_key=True。当model中如果没有自增列,则自动会创建一个列名为id的列。 Integer 阅读全文
posted @ 2019-10-22 10:48 RainBol 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 新电脑第一次使用使用pip命令下载贼慢 我们需要使用国内pipy镜像,参考如下 https://mirrors.tuna.tsinghua.edu.cn/help/pypi/ 所以只要设置一下就行了: pip config set global.index-url 国内的镜像源地址 其他地址还有 阿 阅读全文
posted @ 2019-10-14 15:09 RainBol 阅读(442) 评论(0) 推荐(0) 编辑
摘要: django是python的web重量级框架,发展已经有10年多了,对应下面版本 Django 版本Python 版本 1.8 2.7, 3.2 , 3.3, 3.4, 3.5 1.9, 1.10 2.7, 3.4, 3.5 1.11 2.7, 3.4, 3.5, 3.6 2.0 3.4, 3.5, 阅读全文
posted @ 2019-10-13 19:06 RainBol 阅读(172) 评论(0) 推荐(0) 编辑
摘要: toapi是一个api与爬虫结合的一个库,使用简单,可以自定义api展示,简单的mockserver,但只限制于get请求 toapi会在同级目录下建立缓存机制,再次访问就会读缓存了 安装: pip intall toapi pip install cssselect 运行:python app.p 阅读全文
posted @ 2019-09-30 09:27 RainBol 阅读(586) 评论(0) 推荐(0) 编辑
摘要: #pip install pyyamlimport yaml #yaml文件转成字典 with open('a.yml','rb')as f: res = yaml.load(f,Loader=yaml.FullLoader) print(res) r = {'tester': {'appPacka 阅读全文
posted @ 2019-09-25 17:47 RainBol 阅读(607) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页
Live2D