上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页
摘要: 安装, "官方文档" 1. 配置阿里云的saltstack镜像仓库 2. 主安装salt master salt minion salt api 3. 从安装salt minion 4. 关闭防火墙 或者打开端口 firewall or iptables 5. 启动服务 配置, "官方文档" mas 阅读全文
posted @ 2020-03-28 00:01 random_lee 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 关联对象¶ 当你在模型中定义了关联关系(如 ForeignKey, OneToOneField, 或 ManyToManyField),该模型的实例将会自动获取一套 API,能快捷地访问关联对象。 拿本文开始的模型做例子,一个 Entry 对象 e 通过 blog 属性获取其关联的 Blog 对象: 阅读全文
posted @ 2019-12-28 16:30 random_lee 阅读(270) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/xjmlove/p/10087053.html 阅读全文
posted @ 2019-12-27 17:00 random_lee 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 原文链接 https://my.oschina.net/VASKS/blog/874270 django admin svg 不显示。后台显示 xx.svg 200 但浏览器就是不显示。 百度了一圈,没有一个正确答案。 谷歌上不上,哎,必应一下。 然后去了,stackoverflow http:// 阅读全文
posted @ 2019-10-29 14:36 random_lee 阅读(630) 评论(0) 推荐(0) 编辑
摘要: ``` #!/bin/bash releasever=7 for i in salt-minion salt-api salt-master docker-ce docker-ce-cli docker-compose; do yum install --downloadonly --releasever=${releaserver} --downloaddir=./ ${i} don... 阅读全文
posted @ 2019-09-29 14:37 random_lee 阅读(1210) 评论(0) 推荐(0) 编辑
摘要: ``` !/bin/bash function thread_used_cpu(){ $1 为单个cpu负载的百分比 if [[ $1 == "" ]];then full_load_percent=95 else full_load_precent=$1 fi ps_info=( ) echo $ 阅读全文
posted @ 2019-09-24 10:07 random_lee 阅读(368) 评论(0) 推荐(0) 编辑
摘要: ``` #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Henry 17607168727@163.com import calendar import datetime import time def return_time_stamp(): # 获取当天日期 today = datetime.datetime.t... 阅读全文
posted @ 2019-08-26 18:40 random_lee 阅读(879) 评论(0) 推荐(0) 编辑
摘要: 通常,你想要发送一些编码为表单形式的数据——非常像一个 HTML 表单。要实现这个,只需简单地传递一个字典给 data 参数。你的数据字典在发出请求时会自动编码为表单形式: 你还可以为 data 参数传入一个元组列表。在表单中多个元素使用同一 key 的时候,这种方式尤其有效: 很多时候你想要发送的 阅读全文
posted @ 2019-08-23 13:58 random_lee 阅读(992) 评论(0) 推荐(0) 编辑
摘要: python 2.7 1. codecs python官方文档中文翻译 使用给定模式打开编码文件,并返回提供透明编码/解码的打包版本。默认文件模式为“r”,表示以读取模式打开文件。 2. 使用 需要明确的知道 文件的编码格式 3. indent=4 缩进 4个空格 python 3 1. pytho 阅读全文
posted @ 2019-08-13 14:53 random_lee 阅读(3300) 评论(0) 推荐(0) 编辑
摘要: ```python #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Henry 17607168727@163.com import sys import logging from logging.handlers import TimedRotatingFileHandler import os from subprocess im... 阅读全文
posted @ 2019-07-25 17:44 random_lee 阅读(1423) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页