上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 50 下一页
摘要: 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 阅读(44) 评论(0) 推荐(0)
摘要: 不允许超过30分钟 阅读全文
posted @ 2023-11-24 08:59 tslam 阅读(20) 评论(0) 推荐(0)
摘要: 2分钟内. 阅读全文
posted @ 2023-11-24 08:58 tslam 阅读(16) 评论(0) 推荐(0)
摘要: 一、安装及cmd中使用 1 下载软件(包含服务端和客户端) - 从官网找安装包 下载后 文件 redis-server.exe 就是服务端. 文件 redis-cli.exe 是客户端. 2 在cmd中启动服务端 在当前窗口中运行cmd, 输入redis-serve 为了方便,可以把redis目录加 阅读全文
posted @ 2023-11-20 15:07 tslam 阅读(424) 评论(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 阅读(29) 评论(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 阅读(9) 评论(0) 推荐(0)
摘要: 这个报错 等价于 "jack"(), 即给字符串加了括号让执行. 按照这个思路解决问题 阅读全文
posted @ 2023-10-23 14:41 tslam 阅读(21) 评论(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 阅读(16) 评论(0) 推荐(0)
摘要: res = divmod(101, 10)print(f'res:{res}') # res:(10, 1) 阅读全文
posted @ 2023-10-19 17:25 tslam 阅读(47) 评论(0) 推荐(0)
摘要: ret = chr(65)ret2 = ord('A')print(f'ret:{ret}') # 根据ASCII码找对应字符print(f'ret2:{ret2}') # 根据字符找ASCII码 阅读全文
posted @ 2023-10-19 17:19 tslam 阅读(46) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 50 下一页