摘要: CBV: 第一种方式 @method_decorator(csrf_exempt) def dispatch(self, request, *args, **kwargs): return super(NodeGroups, self).dispatch(request,*args,**kwargs 阅读全文
posted @ 2021-06-17 17:58 x-dai 阅读(229) 评论(0) 推荐(0)
摘要: 使用方法 eg:在a标签里使用点击事件触发函数 function startTask(e) { var nodeGroupId = e.id alert(groupid) {# 发ajax请求#} params = { "nodeGroupId":nodeGroupId, "taskType":"S 阅读全文
posted @ 2021-06-17 17:08 x-dai 阅读(364) 评论(0) 推荐(0)
摘要: 方法一: 直接使用str str(bytes,encoding=‘utf-8’) 方法二: 使用bytes函数 bytes.decode(bytes, encoding='utf-8') 阅读全文
posted @ 2021-06-17 16:30 x-dai 阅读(279) 评论(0) 推荐(0)
摘要: Python通过redis库来实现发布和订阅 import redis class RedisHelper: def __init__(self): self.__conn = redis.Redis(host='192.168.5.124',password='XXXXX') self.chan_ 阅读全文
posted @ 2021-06-17 16:27 x-dai 阅读(433) 评论(0) 推荐(0)