09 2021 档案

摘要:1. 代码(参考:https://www.cnblogs.com/xiao-xue-di/p/11840699.html) def dict_fetchall(cursor): "Return all rows from a cursor as a dict" columns = [col[0] f 阅读全文
posted @ 2021-09-25 14:10 10132714 阅读(492) 评论(0) 推荐(0) 编辑
摘要:1. 配置及使用 1. setting.py中配置 # log_settings # 创建一个日志文件夹LOGGING_DIR = "%s/logs" % BASE_DIR if not os.path.exists(LOGGING_DIR): os.mkdir(LOGGING_DIR) # 将日志 阅读全文
posted @ 2021-09-15 19:40 10132714 阅读(35) 评论(0) 推荐(0) 编辑
摘要:如果需要查询的字符串类型的列的值有单引号和\时 在单引号前面加一个单引号,在\前面加一个\select * from purchase_order where lmt_fail_reason like '%{u''information'': u''\\u521b\\u5efa\\u5931\\u8 阅读全文
posted @ 2021-09-14 15:52 10132714 阅读(2539) 评论(0) 推荐(0) 编辑
摘要:1. 将Unicode转为中文 1. 字符串.encode('utf8') 2. 字符串.encode('raw_unicode_escape')对于字典里面的unicodea = {u'information': u'\u521b\u5efa\u5931\u8d25\uff0c\u6570\u63 阅读全文
posted @ 2021-09-14 15:49 10132714 阅读(160) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示