上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 45 下一页
摘要: 即其已经被git管理,含有.git文件夹了. 你不要把其删了,再git init 且 已经有远程源和地址的一一对应关系了,可以 git remote -v查看 这时如果你修改或新增代码,在提交到本地版本库后, 先把远程最新代码拉且合并到本地git pull origin master, 然后git 阅读全文
posted @ 2022-08-03 15:36 tslam 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 可以 阅读全文
posted @ 2022-08-03 15:29 tslam 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 1 何时执行? 情况1 在models.py中新建模型表后, 需要执行数据库迁移命令才能表成功在数据库中创建. 延伸: 当删除库,重新建库后ye需要 情况2 当对models.py进行修改后 2 命令是什么? python manage.py makemigrations python manage 阅读全文
posted @ 2022-08-02 20:53 tslam 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 项目数据库连接不成功,查看数据库的库名、用户名、密码是否正确. 案例 阅读全文
posted @ 2022-08-02 18:23 tslam 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 除标题外,还有报错: django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required; you have 0.6.7.None 解决: 需要改: > 虚拟环境> Lib\site-packages 阅读全文
posted @ 2022-08-02 14:01 tslam 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 项目代码中有一句'白班'&'夜班' 这里的意思是: 还有上连班的. 这时,若要过滤白班人员信息需要,用模糊查询: 字段_ _contain xxx.objects.filter(onduty_type_ _contain=onduty_type_) 阅读全文
posted @ 2022-08-01 08:48 tslam 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 1 %s 格式化字符串 2 f 占位符内包含变量.如{a} {b} a = 'xiaoliu' b = 12.35 print(f'{a}成绩提高了{b}') # xiaoliu成绩提高了12.35 3 format 阅读全文
posted @ 2022-07-31 21:11 tslam 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 参考1<不成熟> install_scripts.py 关注点: tar.gz解压后包,如何脚本安装 经过当时测试, 最后发现此类解压后包还是手动安装为好. import osimport subprocessimport timefrom icecream import icpkgs_path = 阅读全文
posted @ 2022-07-31 14:18 tslam 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 可以看出: 命令之间用&连接 from icecream import iccmd = f'cd ./{lib}'cmd1 = f'python setup.py install'# res = subprocess.Popen("dir",shell=True, stdout=subprocess 阅读全文
posted @ 2022-07-31 14:13 tslam 阅读(3466) 评论(0) 推荐(0) 编辑
摘要: 如下 其中: 直接右键以及以绝对方式运行是可以的 > python 绝对路径 阅读全文
posted @ 2022-07-31 12:56 tslam 阅读(915) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 45 下一页