首页 |  我的博客 |  查看该博主内容分类 | 

03 2023 档案

摘要:解决办法 queryset.values(指定名称=F('原查询条件')),指定名称不能与原模型的字段重名 如: models.Book.objects.filter(pk=9).values(name=F('publisher__name')) 得到的结果键名即为:name 阅读全文
posted @ 2023-03-22 09:33 Z哎呀 阅读(71) 评论(0) 推荐(0) 编辑
摘要:解决办法 在按钮的@click上加上修饰符.stop来阻止事件冒泡,如:@click.stop="xxx" 阅读全文
posted @ 2023-03-21 16:52 Z哎呀 阅读(480) 评论(0) 推荐(1) 编辑
摘要:原因 排除models模型写错之外,反向查询的表必须有关联的记录。 简而言之,不是模型设置错误,而是查不到数据。 解决办法 反向查询的表,必须至少存在一条指向主表关联的记录数据。 比如: 主表A主键为1,那么在反向查询表B必须有一条指向A表主键1的数据。 阅读全文
posted @ 2023-03-17 09:11 Z哎呀 阅读(93) 评论(0) 推荐(0) 编辑
摘要:步骤 windows + r 打开命令行; 输入%appdata%回车; 在出现的文件夹中找到名称为pip的文件夹(没有则创建) 创建pip.ini文件 [global] timeout = 6000 index-url = http://pypi.douban.com/simple trusted 阅读全文
posted @ 2023-03-14 21:47 Z哎呀 阅读(29) 评论(0) 推荐(0) 编辑
摘要:解决办法 start.vbs Set ws = CreateObject("WScript.Shell") ws.Run "你要执行的dos命令", 0 如: Set ws = CreateObject("WScript.Shell") ws.Run ".\python-3.9.7-embed-am 阅读全文
posted @ 2023-03-13 09:31 Z哎呀 阅读(261) 评论(0) 推荐(0) 编辑
摘要:原因 W3C 标准中有如下规定 When there is only one single-line text input field in a form, the user agent should accept Enter in that field as a requestto submit 阅读全文
posted @ 2023-03-08 09:09 Z哎呀 阅读(346) 评论(0) 推荐(0) 编辑
摘要:原因 openai库版本过旧 解决办法(二选一) 更新openai库 pip更新 pip install -U openai 手动安装包更新 下载安装包放入你的项目根目录下,改名格式zip为whl(即:openai-0.27.0-py3-none-any.zip→openai-0.27.0-py3- 阅读全文
posted @ 2023-03-03 18:54 Z哎呀 阅读(645) 评论(0) 推荐(0) 编辑

// let homeEle = document.querySelector('body') // homeEle.setAttribute('id', 'particles-js') // /* ---- particles.js config ---- */ // particlesJS("particles-js", { // "particles": { // "number": { // "value": 380, // "density": { // "enable": true, // "value_area": 800 // } // }, // "color": { // "value": "#ffffff" // }, // "shape": { // "type": "circle", // "stroke": { // "width": 0, // "color": "#000000" // }, // "polygon": { // "nb_sides": 5 // }, // "image": { // "src": "img/github.svg", // "width": 100, // "height": 100 // } // }, // "opacity": { // "value": 0.5, // "random": false, // "anim": { // "enable": false, // "speed": 1, // "opacity_min": 0.1, // "sync": false // } // }, // "size": { // "value": 3, // "random": true, // "anim": { // "enable": false, // "speed": 40, // "size_min": 0.1, // "sync": false // } // }, // "line_linked": { // "enable": true, // "distance": 150, // "color": "#ffffff", // "opacity": 0.4, // "width": 1 // }, // "move": { // "enable": true, // "speed": 6, // "direction": "none", // "random": false, // "straight": false, // "out_mode": "out", // "bounce": false, // "attract": { // "enable": false, // "rotateX": 600, // "rotateY": 1200 // } // } // }, // "interactivity": { // "detect_on": "canvas", // "events": { // "onhover": { // "enable": true, // "mode": "grab" // }, // "onclick": { // "enable": true, // "mode": "push" // }, // "resize": true // }, // "modes": { // "grab": { // "distance": 140, // "line_linked": { // "opacity": 1 // } // }, // "bubble": { // "distance": 400, // "size": 40, // "duration": 2, // "opacity": 8, // "speed": 3 // }, // "repulse": { // "distance": 200, // "duration": 0.4 // }, // "push": { // "particles_nb": 4 // }, // "remove": { // "particles_nb": 2 // } // } // }, // "retina_detect": true // }); // var count_particles, stats, update; // stats = new Stats; // stats.setMode(0); // stats.domElement.style.position = 'absolute'; // stats.domElement.style.left = '0px'; // stats.domElement.style.top = '0px'; // document.body.appendChild(stats.domElement); // count_particles = document.querySelector('.js-count-particles'); // update = function() { // stats.begin(); // stats.end(); // if (window.pJSDom[0].pJS.particles && window.pJSDom[0].pJS.particles.array) { // count_particles.innerText = window.pJSDom[0].pJS.particles.array.length; // } // requestAnimationFrame(update); // }; // requestAnimationFrame(update);
点击右上角即可分享
微信分享提示