摘要: 1. search - 用于过滤事件 [search ... ] # 在默认情况下,所有搜索都隐含了 search 命令 2. index - 用于指定搜索的索引 index = "xxx" # 如果不指定索引,Splunk 会在所有可访问的索引中搜索 3. | - 管道符:将一个命令的输出作为另一 阅读全文
posted @ 2024-05-14 16:01 wellplayed 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 基本组件的使用 -restful规范 -序列化组件 -APIView源码分析 -Response源码分析 -source用法 -定制字段的两种方式 -反序列化的保存与修改 -ModelSerializer用法 -请求与响应 -状态码 -GenericAPIView用法 -路由组件 -认证组件 -权限 阅读全文
posted @ 2023-11-20 21:03 wellplayed 阅读(15) 评论(1) 推荐(2) 编辑
摘要: 一. 正常函数版本的思路 1. notify.py def wechat(content): print('微信通知:%s'%content) def qq(content): print('qq通知:%s'%content) def email(content): print('邮箱通知:%s'% 阅读全文
posted @ 2023-10-29 21:24 wellplayed 阅读(10) 评论(0) 推荐(2) 编辑
摘要: from rest_framework_simplejwt.authentication import JWTAuthentication from rest_framework.permissions import IsAuthenticated, DjangoModelPermissions c 阅读全文
posted @ 2024-06-21 13:22 wellplayed 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 视图层 from rest_framework_simplejwt.tokens import AccessToken from django.middleware.csrf import get_token from django.contrib.auth import login class J 阅读全文
posted @ 2024-06-21 10:28 wellplayed 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import smtplib from email.mime.text import MIMEText from email.header import Header from email.utils import formataddr from utils.common_logger import 阅读全文
posted @ 2024-06-21 09:41 wellplayed 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; import './css/global.css'; import axios from 'axios'; // 阅读全文
posted @ 2024-06-20 13:57 wellplayed 阅读(1) 评论(0) 推荐(0) 编辑
摘要: MySQL自带了一个命令行工具mysqldump,可以方便的将数据导出至文件 使用案例 mysqldump -u root -p 数据库名称 > xxx.sql # 再输入密码即可 # 增加过滤条件 mysqldump -u root -p 数据库名称 表名称 --where="id>1000" > 阅读全文
posted @ 2024-06-17 11:51 wellplayed 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 首先需要确保安装依赖 pip install celery redis eventlet 在创建的app文件内添加tasks.py # app01/tasks.py from celery import shared_task @shared_task def simple_task(): prin 阅读全文
posted @ 2024-06-13 17:24 wellplayed 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 显示当前用户的所有权限 SHOW GRANTS; # 如果当前是普通用户,只能看见自己的权限 查看指定用户的权限 SHOW GRANTS FOR 'username'@'host'; 阅读全文
posted @ 2024-05-24 09:17 wellplayed 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 第一步:安装APScheduler pip install apscheduler 第二步:配置APScheduler # 导入模块 from apscheduler.schedulers.background import BackgroundScheduler # 自定义定时启动的任务 def 阅读全文
posted @ 2024-05-22 17:58 wellplayed 阅读(7) 评论(0) 推荐(0) 编辑
摘要: TRUNCATE TABLE ·表名· 阅读全文
posted @ 2024-05-14 16:36 wellplayed 阅读(4) 评论(0) 推荐(0) 编辑