摘要: 1、使用yagmail,发送一个带附件的邮件,只需要2行代码: import yagmail yag = yagmail.SMTP(user='joy_lmx@163.com', password='nicai?', host='smtp.163.com', port='25') yag.send( 阅读全文
posted @ 2022-10-09 16:05 pearlcity 阅读(49) 评论(0) 推荐(0)
摘要: 重点关注 Go 设置阿里源镜像地址go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/ go env -w GOPROXY=https://goproxy.cn,direct 1、闭包 package main import "fmt" func 阅读全文
posted @ 2022-10-05 12:18 pearlcity 阅读(116) 评论(0) 推荐(0)
摘要: 一、增删查改 user = {"id": 2, "mobile": "2313", "name": "2313"} company = {"id": 2, "name": "2313", "creator_id": 2313} match = {'id': 6} values = {'iint': 阅读全文
posted @ 2022-09-30 20:15 pearlcity 阅读(135) 评论(0) 推荐(0)
摘要: 0、ObjectId 不能直接return前端,需要2次包裹 一、repl包裹 二、dict包裹 return {'msg': repr(docs)} return {'code': 1, 'msg': '查询成功', 'data': {'auth_list': repr(result)}} 聚合( 阅读全文
posted @ 2022-09-22 14:52 pearlcity 阅读(62) 评论(0) 推荐(0)
摘要: vxe-table 表格 tooltip 被弹出框遮挡,z-index 层级过低,解决方案 import VXETable from 'vxe-table' // 全局默认参数 VXETable.setup({ version: 0, zIndex: 999, // 想多高就设置多高 table: 阅读全文
posted @ 2022-09-17 23:22 pearlcity 阅读(714) 评论(0) 推荐(0)
摘要: 配置 frp 实现内网穿透 frp 中文文档:https://github.com/fatedier/frp/blob/master/README_zh.md 一、frp 的作用 利用处于内网或防火墙后的机器,对外网环境提供 http 或 https 服务。 对于 http, https 服务支持基 阅读全文
posted @ 2022-09-08 15:14 pearlcity 阅读(1500) 评论(0) 推荐(0)
摘要: 定义数据结构 class LockItem(BaseModel): id: int location: str is_userassignable: bool class LocksetItem(BaseModel): id: int name: str locks: List[LockItem] 阅读全文
posted @ 2022-09-01 09:36 pearlcity 阅读(35) 评论(0) 推荐(0)
摘要: 运行命令和生成镜像命令 [redis V2.0] 使用官方镜像直接运行 docker run -itd -e TZ="Asia/Shanghai" --restart=always --name V2-redis -p 6379:6379 --privileged=true -v /yunhuoV2 阅读全文
posted @ 2022-08-29 12:36 pearlcity 阅读(1231) 评论(1) 推荐(0)
摘要: _assign为查询返回的QuerySet,licensee为外键,在这条件下,注意下列结果:_assign.licensee 值为QuerySet_assign.licensee_id 值为int 结论:从querySet取外键id值时,要加上 _id; 同时可以推断出取其他字段值是,为 _ass 阅读全文
posted @ 2022-08-22 00:10 pearlcity 阅读(2518) 评论(0) 推荐(0)
摘要: 数据 由于在创建模型的时候,是继承的tortoise.Model,看看tortoise.Model都提供了什么方法,如果发现又不满足使用场景的情况,再来修改或者补充 看看有用的方法 1、filter:使用给定的过滤条件创建 QuerySet,即查询满足指定条件的数据 2、exclude:使用给定的排 阅读全文
posted @ 2022-08-19 14:17 pearlcity 阅读(599) 评论(0) 推荐(0)