上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 45 下一页
摘要: mysql表中 1 表名没有app名做前缀 class Meta: db_table = '英文表名' verbose_name_plural = '中文表名' 2 表名有app名做前缀 class Meta: verbose_name = '中文表名' verbose_name_plural = 阅读全文
posted @ 2023-11-28 09:19 tslam 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 不允许超过30分钟 阅读全文
posted @ 2023-11-24 08:59 tslam 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 2分钟内. 阅读全文
posted @ 2023-11-24 08:58 tslam 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 一、安装及cmd中使用 1 下载软件(包含服务端和客户端) - 从官网找安装包 下载后 文件 redis-server.exe 就是服务端. 文件 redis-cli.exe 是客户端. 2 在cmd中启动服务端 在当前窗口中运行cmd, 输入redis-serve 为了方便,可以把redis目录加 阅读全文
posted @ 2023-11-20 15:07 tslam 阅读(328) 评论(0) 推荐(0) 编辑
摘要: code import os import time from concurrent.futures.thread import ThreadPoolExecutor def test(n): print(f'n:{n}-os.getpid:{os.getpid()}') time.sleep(2) 阅读全文
posted @ 2023-10-24 16:48 tslam 阅读(6) 评论(0) 推荐(0) 编辑
摘要: code import os import time from concurrent.futures.process import ProcessPoolExecutor def test(n): print(f'n:{n}-os.getpid:{os.getpid()}') time.sleep( 阅读全文
posted @ 2023-10-24 16:24 tslam 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 这个报错 等价于 "jack"(), 即给字符串加了括号让执行. 按照这个思路解决问题 阅读全文
posted @ 2023-10-23 14:41 tslam 阅读(4) 评论(0) 推荐(0) 编辑
摘要: import jsonclass Animal(object): def __init__(self): self.name = 'tom' def __repr__(self): return f'my name is {self.name}&i like apple'd1 = { 'county 阅读全文
posted @ 2023-10-20 14:48 tslam 阅读(7) 评论(0) 推荐(0) 编辑
摘要: ret = round(2.6)ret2 = round(2.5)print(f'ret:{ret}') # 3print(f'ret2:{ret2}') # 2 阅读全文
posted @ 2023-10-19 17:30 tslam 阅读(10) 评论(0) 推荐(0) 编辑
摘要: res = divmod(101, 10)print(f'res:{res}') # res:(10, 1) 阅读全文
posted @ 2023-10-19 17:25 tslam 阅读(18) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 45 下一页