上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 1 #!/usr/bin/env python 2 3 import json 4 import shutil 5 from ansible.module_utils.common.collections import ImmutableDict 6 from ansible.parsing.dat 阅读全文
posted @ 2020-05-27 23:47 xuqidong 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 1.安装ansible wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum install ansible -y 2.管理被控端,管理机先生成秘钥,然后推送公钥 [root@demo ~] 阅读全文
posted @ 2020-05-24 23:18 xuqidong 阅读(188) 评论(0) 推荐(0) 编辑
摘要: import os from celery import Celery os.environ.setdefault("DJANGO_SETTINGS_MODULE", "swiper.settings") celery_app = Celery('swiper') celery_app.config 阅读全文
posted @ 2020-04-19 21:36 xuqidong 阅读(129) 评论(0) 推荐(0) 编辑
摘要: from django.utils.deprecation import MiddlewareMixin class MyCorsMiddle(MiddlewareMixin): def process_response(self,request,response): # 简单请求: # 允许htt 阅读全文
posted @ 2020-04-18 17:44 xuqidong 阅读(67) 评论(0) 推荐(0) 编辑
摘要: def distribute_permissions(request): uid = request.GET.get('uid') user = User.objects.filter(id=uid) user_list = User.objects.all() roles = Role.objec 阅读全文
posted @ 2020-04-06 21:58 xuqidong 阅读(102) 评论(0) 推荐(0) 编辑
摘要: select table_schema,group_concat(table_name) from tables group by table_schema; -- 统计每个库的数据量大小,并从大到小排序 select table_schema,sum(AVG_ROW_LENGTH*TABLE_RO 阅读全文
posted @ 2020-04-04 23:28 xuqidong 阅读(132) 评论(0) 推荐(0) 编辑
摘要: import re from django.utils.deprecation import MiddlewareMixin from django.shortcuts import HttpResponse,redirect from app01.models import Permission 阅读全文
posted @ 2020-03-30 22:27 xuqidong 阅读(153) 评论(0) 推荐(0) 编辑
摘要: mkdir -p /application 995 tar xf mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz 997 mv mysql-5.7.26-linux-glibc2.12-x86_64 /application/mysql 998 cd /appl 阅读全文
posted @ 2020-03-27 23:56 xuqidong 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 1 from django.db import models 2 3 # Create your models here. 4 class User(models.Model): 5 name=models.CharField(max_length=11) 6 pwd=models.CharFiel 阅读全文
posted @ 2020-03-25 00:03 xuqidong 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 1 from app01.models import Role 2 3 def initial_session(user,request): 4 permissions = Role.objects.filter(user=user).values('permissions__url', 5 'pe 阅读全文
posted @ 2020-03-24 00:16 xuqidong 阅读(290) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页