Loading

04 2020 档案

摘要:参考文章:https://blog.csdn.net/yanghuan313/article/details/63262477 python编码:encode() 将Unicode字符按照编码规则(如UTF-8)编成字节序列。 >>> a = u"测试">>> a.encode("UTF-8")'\ 阅读全文
posted @ 2020-04-18 22:12 wsongl 阅读(177) 评论(0) 推荐(0)
摘要:生产采用方案: 1 # 前面6个根据实际修改,其他的可以不用改 2 [uwsgi] 3 # 项目目录 4 chdir=/Users/wsl/App/dev/recovery/recovery 5 # 设置日志目录 6 daemonize=/Users/wsl/App/dev/recovery/uws 阅读全文
posted @ 2020-04-15 09:07 wsongl 阅读(3387) 评论(0) 推荐(0)
摘要:参考: 1. 解释为什么及何时适合用这语法:https://blog.csdn.net/AlanGuoo/article/details/78855750 2. 代码写法示例:https://blog.csdn.net/huo_1214/article/details/79242516 # _nam 阅读全文
posted @ 2020-04-14 21:22 wsongl 阅读(205) 评论(0) 推荐(0)
摘要:序号(后面举例用) 类型 举例 作用说明 1 前单下划线 _var ★★ 命名约定为私有属性、方法,但不会强制执行(报错),只是作为提示. 经常用于property语法中. 2 后单下划线 var_ ★ 避免与关键字冲突,又让变量名具有可读性. 举例:加入想用type = "ok" ,但type是关 阅读全文
posted @ 2020-04-14 20:47 wsongl 阅读(485) 评论(0) 推荐(0)
摘要:1 from django.shortcuts import HttpResponse 2 from django.http import JsonResponse 3 from django.core import serializers 4 from app01.models import Pe 阅读全文
posted @ 2020-04-07 19:56 wsongl 阅读(3383) 评论(0) 推荐(0)
摘要:官方文档:http://2.python-requests.org/zh_CN/latest/user/quickstart.html 参考:https://www.cnblogs.com/lanyinhao/p/9634742.html 阅读全文
posted @ 2020-04-07 16:21 wsongl 阅读(150) 评论(0) 推荐(0)
摘要:pyzabbix github地址: https://github.com/lukecyca/pyzabbix zabbix官方接口: https://www.zabbix.com/documentation/4.0/zh/manual/api 1 from pyzabbix import Zabb 阅读全文
posted @ 2020-04-05 23:52 wsongl 阅读(2733) 评论(0) 推荐(0)