会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
guanchaoguo
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
41
42
43
44
45
46
47
48
49
···
68
下一页
2023年2月27日
django 安装cerlery error in anyjson setup command: use_2to3 is invalid.
摘要: 直接报错 error in anyjson setup command: use_2to3 is invalid. setuptools pip install "setuptools<58.0.0" 再次安装 pip install django-celery
阅读全文
posted @ 2023-02-27 11:36 vx_guanchaoguo0
阅读(122)
评论(0)
推荐(0)
2023年2月22日
django中读取settings中的相关参数
摘要: from django.conf import settings print(settings.IP_LOCAL)
阅读全文
posted @ 2023-02-22 18:17 vx_guanchaoguo0
阅读(76)
评论(0)
推荐(0)
python 提取文件的名字 和路径
摘要: # coding=utf-8 import sys import os s = 'C:/Users/Desktop/lesson/python/calss1.py' m_dir = os.path.dirname(s) # 输出为 'C:/Users/Desktop/lesson/python' m
阅读全文
posted @ 2023-02-22 16:31 vx_guanchaoguo0
阅读(39)
评论(0)
推荐(0)
django 关联类 DoesNotExist: User matching query does not exist.
摘要: ####问题就是 关联类为空找不到 在或者geattr / hasattr / obj. item 会抛出异常 ####无法通过判断处理 捕获异常 try: tmp_data['demand_dept_name'] = data.demand_dept.name except Exception:
阅读全文
posted @ 2023-02-22 16:29 vx_guanchaoguo0
阅读(235)
评论(0)
推荐(0)
python 嵌套对象转为dict
摘要: as_dict(self, keys=None, exclude_keys=None): """ 将ORM对象序列化为字典 :param keys: :return: """ if not keys: keys = self.output_fields keys += ['add_datetime'
阅读全文
posted @ 2023-02-22 10:20 vx_guanchaoguo0
阅读(124)
评论(0)
推荐(0)
python 删除大于超过一定时间文件
摘要: import os from datetime import datetime, timedelta path = "." if __name__ == '__main__': for root, firs, files in os.walk(path): for file in files: if
阅读全文
posted @ 2023-02-22 10:01 vx_guanchaoguo0
阅读(60)
评论(0)
推荐(0)
2023年2月21日
h5 json 生成excel
摘要: 引入库文件 创建下载按钮 Download Demo Excel 实现转换 var data = [ ["Joa Doe", "joa@doe.com"], ["Job Doe", "job@doe.com"], ["Joe Doe", "joe@doe.com"], ["Jon Doe", "jo
阅读全文
posted @ 2023-02-21 11:47 vx_guanchaoguo0
阅读(57)
评论(0)
推荐(0)
h5 下载excel文件并实现通知
摘要: 在ajax 返回实际上已经拿到了 服务端的数据 完成了数据的读取逻辑 fetch('http://localhost:8000/media/default/2023/02/45/\u519c\u5bb6\u4e50\u7533\u529e_ee8f4dde_5233.xlsx',{ headers:
阅读全文
posted @ 2023-02-21 11:08 vx_guanchaoguo0
阅读(176)
评论(0)
推荐(0)
python * 和 ** 的理解
摘要: 数学计算、获取参数 、通配符 数学计算 乘法 计算 a * b 立方计算 a ** b 获取参数 表示函数的可变参数 例如 func (*agr) 实际调用可以在函数写入多个参数 * func(a,b,c) * languge = (a,b,c); func(*languge) 表示形参 字典形式
阅读全文
posted @ 2023-02-21 09:23 vx_guanchaoguo0
阅读(45)
评论(0)
推荐(0)
2023年2月20日
python excel 导出
摘要: 插入特殊符号 符号表 打开Excel点击“插入”-“符号”打开符号面板 在“符号”面板中,点击来自下拉菜单,点击选中“Unicode(十六进制)”。 点击选中特殊字符,在字符代码处即可查看到该特殊符号的Unicode编码。 from openpyxl import Workbook import d
阅读全文
posted @ 2023-02-20 15:26 vx_guanchaoguo0
阅读(26)
评论(0)
推荐(0)
上一页
1
···
41
42
43
44
45
46
47
48
49
···
68
下一页
公告