首页 |  我的博客 |  查看该博主内容分类 | 
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 环境 django==3.8.18 elasticsearch==7.13.4 drf-haystack==1.8.11 django-haystack==3.2.1 原因 django-haystack如果没有指定HAYSTACK_IDENTIFIER_METHOD,默认使用<app.label> 阅读全文
posted @ 2023-05-04 17:42 Z哎呀 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 有很多可以查询的方法,这里列举一个我常用的 办法 查询自身 https://www.cip.cc/ 查询指定ip http://www.cip.cc/需要查询的ip 如:https://www.cip.cc/112.80.248.76 阅读全文
posted @ 2023-04-09 17:20 Z哎呀 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 解决办法 queryset.values(指定名称=F('原查询条件')),指定名称不能与原模型的字段重名 如: models.Book.objects.filter(pk=9).values(name=F('publisher__name')) 得到的结果键名即为:name 阅读全文
posted @ 2023-03-22 09:33 Z哎呀 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 解决办法 在按钮的@click上加上修饰符.stop来阻止事件冒泡,如:@click.stop="xxx" 阅读全文
posted @ 2023-03-21 16:52 Z哎呀 阅读(230) 评论(0) 推荐(1) 编辑
摘要: 原因 排除models模型写错之外,反向查询的表必须有关联的记录。 简而言之,不是模型设置错误,而是查不到数据。 解决办法 反向查询的表,必须至少存在一条指向主表关联的记录数据。 比如: 主表A主键为1,那么在反向查询表B必须有一条指向A表主键1的数据。 阅读全文
posted @ 2023-03-17 09:11 Z哎呀 阅读(73) 评论(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哎呀 阅读(22) 评论(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哎呀 阅读(185) 评论(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哎呀 阅读(258) 评论(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哎呀 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 原因 梯子同地区用的人过多,openAI本身有问答频率限制的机制,多人共用的情况下,网站会认为都是同一个用户问答,所以会对该ip进行限制。 解决办法 换个相对独立,没那么多人用的梯子,找个“安静点”的地区。 阅读全文
posted @ 2023-02-28 14:00 Z哎呀 阅读(4746) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
// 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);