摘要: https://www.nhooo.com/note/qa3v7f.html 通常我们会用到过滤两个时间段内的一些数据, 当我们用django rest framework的时候, 他可以根据字段filter_fields进行过滤, 但是对于日期来说并不起作用, 这个时候就需要我们设置重写query 阅读全文
posted @ 2023-02-03 13:13 门徒21 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 问题: USE_TZ = False后,django orm 查询时间报错:MySQL backend does not support timezone-aware datetimes when USE_TZ is False. 解决: 查询时间前,做替换 import pytz from dja 阅读全文
posted @ 2023-01-29 14:13 门徒21 阅读(316) 评论(0) 推荐(0) 编辑
摘要: Js自动触发a标签的点击事件并跳转页面 阅读全文
posted @ 2022-12-27 15:35 门徒21 阅读(469) 评论(0) 推荐(0) 编辑
摘要: #遍历字典, 分别打印key, value, key:value emp = {'name':'Tom', 'age':20, 'salary' : 8800.00} for k in emp.keys(): print('key = {}'.format(k)) for v in emp.valu 阅读全文
posted @ 2022-11-28 14:54 门徒21 阅读(393) 评论(0) 推荐(0) 编辑
摘要: Promise.all([ request({ url: urlPrefix_custom, method: 'get', params: querys }) ]).then((res)=>{ console.log(" 自定义事件详情数据导出,回调数据 ") console.log(res[0]. 阅读全文
posted @ 2022-11-28 14:06 门徒21 阅读(975) 评论(0) 推荐(0) 编辑
摘要: 获取带参数URL:request.get_all_path() 获取不带参数URL:request.path 获取主机地址:request.get_host() 阅读全文
posted @ 2022-11-28 13:32 门徒21 阅读(16) 评论(0) 推荐(0) 编辑
摘要: // 读取本地json文件 export function GetUserAction (query){ let quesa = axios.get('/json/userAction.json').then(res => { // 获取public下的buildmenu.json文件数据 cons 阅读全文
posted @ 2022-11-25 16:35 门徒21 阅读(1460) 评论(0) 推荐(0) 编辑
摘要: 数据打印格式: VUE部分: <div style="height:80vw;"> <el-table :data="resultTable.slice((queryInfo.pagenum-1)*queryInfo.pagesize,queryInfo.pagenum*queryInfo.page 阅读全文
posted @ 2022-11-17 16:06 门徒21 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 取整 1.取整 // 丢弃小数部分,保留整数部分 parseInt(5/2) // 2 2.向上取整 // 向上取整,有小数就整数部分加1 Math.ceil(5/2) // 3 3.向下取整 // 向下取整,丢弃小数部分 Math.floor(5/2) // 2 4四舍五入 // 四舍五入 Mat 阅读全文
posted @ 2022-11-17 15:50 门徒21 阅读(377) 评论(0) 推荐(0) 编辑
摘要: <template> <div> <el-table :data="resultTable" border ref="multipleTable" tooltip-effect="light" size="mini"> <el-table-column type="index" label="序号" 阅读全文
posted @ 2022-11-16 15:20 门徒21 阅读(502) 评论(0) 推荐(0) 编辑