上一页 1 2 3 4 5 6 7 ··· 23 下一页
摘要: 在网页设计中,我们常常需要让元素随着屏幕大小的变化而自适应。这样可以让网页在不同尺寸的设备上显示得更加美观和合理。CSS提供了很多的技巧来实现这一目的。 第一种方法是使用百分比来设置元素的大小。比如,可以将容器宽度设置为100%,这样容器就会随着屏幕大小的变化而自适应。同时,也可以使用百分比来设置字 阅读全文
posted @ 2023-10-21 23:27 CrossPython 阅读(2641) 评论(0) 推荐(0) 编辑
摘要: 恭喜你,已经完成了本专题的学习。下面我们对本专题进行简要的总结。 不知道你通过本专题的学习有哪些收获,欢迎你跟我们或者身边的朋友分享。针对本专题开发的博客,我希望你要明确一点: 这个博客只是用来教学的,不要用于生产环境。 安全 本专题使用的是最简单的Cookie来鉴权,这是一种非常弱的保护机制。 性 阅读全文
posted @ 2023-10-21 20:24 CrossPython 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 本章将实现存档文章列表功能。注意,本章涉及较多PostgreSQL知识,如果你对相关知识不熟悉,可以先让代码跑起来,再去了解相关知识。 模板 本功能模板文件是templates/frontend/topic_arch.html。 视图类 本功能视图类定义在src/view/frontend/topi 阅读全文
posted @ 2023-10-21 20:23 CrossPython 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 本章将实现博客文章的详情显示功能。 数据库视图 CREATE VIEW v_topic_cat_detail AS SELECT t.id, title, html, hit, dateline,category_id,t.is_del, c.name AS category_name FROM t 阅读全文
posted @ 2023-10-21 20:22 CrossPython 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 本章将实现博客的分类文章列表功能。 模板 请参见代码仓库的templates/frontend/topic_list.html 视图类 请参见代码仓库的src/view/frontend/topic.rs handler // src/handler/frontend/topic.rs pub as 阅读全文
posted @ 2023-10-21 20:22 CrossPython 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 后台管理完成后,我们开始进入前台功能的开发。本章我们将完成博客首页的开发。 母模板 templates/frontend/base.html 是时候对前台母模板进行数据填充和块的定义了: <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset 阅读全文
posted @ 2023-10-21 20:21 CrossPython 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 目前,后台管理功能基本完成,但还有两个工作没做:清理后台管理的导航菜单以及后台管理首页的模板。 后台管理菜单 <!-- templates/backend/base.html --> <!-- ... --> <div class="container-fluid"> <div class="row 阅读全文
posted @ 2023-10-21 20:20 CrossPython 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 本章实现后台管理的鉴权,以及管理员的登录、注销功能。涉及的知识点有:cookie及中间件等。 数据库结构 CREATE TABLE admins ( id SERIAL PRIMARY KEY, email VARCHAR(255) NOT NULL, password VARCHAR(255) N 阅读全文
posted @ 2023-10-21 20:19 CrossPython 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 本章我们将实现博客的文章管理功能。 数据库结构 CREATE TABLE topics ( id BIGSERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, category_id INT NOT NULL, summary VARCHAR(255) NO 阅读全文
posted @ 2023-10-21 20:18 CrossPython 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 本章开始,我们将对博客的具体业务进行实现。首先,我们实现博客分类的管理功能。 数据库结构 CREATE TABLE categories ( id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL, is_del BOOLEAN NOT NULL DEFA 阅读全文
posted @ 2023-10-21 20:17 CrossPython 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 我们的博客分为“前台”和“后台”两部分。前台用于展示博客内容,后台用于管理博客。本章我们将编写前台和后台的基础模板以及对应的路由。 目录结构 前台模板位于 templates/frontend,后台模板位于templates/backend。 前台 我们的前台模板基于 Bootstrap的Blog  阅读全文
posted @ 2023-10-21 20:16 CrossPython 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 本章我们将开始搭建本应用的骨架,包括:依赖、Result 和 AppError 以及通用数据库操作等。 依赖 # Cargo.toml [dependencies] tokio = { version="1", features = ["full"] } serde = { version="1", 阅读全文
posted @ 2023-10-21 20:15 CrossPython 阅读(176) 评论(0) 推荐(0) 编辑
摘要: pycharm 主页 Help -> Find Action -> 输入 Registry -> 禁用ide.await.scope.completion 阅读全文
posted @ 2023-10-21 08:31 CrossPython 阅读(316) 评论(0) 推荐(0) 编辑
摘要: service_log_path = None 阅读全文
posted @ 2023-10-20 15:16 CrossPython 阅读(15) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver from fake_useragent import UserAgent ua = UserAgent().random options = webdriver.ChromeOptions() options.add_argument(' 阅读全文
posted @ 2023-10-20 13:41 CrossPython 阅读(384) 评论(0) 推荐(0) 编辑
摘要: Python + Firefox + 插件(closeproxy.xpi) 其中,closeproxy.xpi文件,需要Google、Bing搜下都能搜到下载地址 完整的测试代码如下: from selenium import webdriver from selenium.webdriver.fi 阅读全文
posted @ 2023-10-20 13:38 CrossPython 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 设置Firefox headless模式 def setUp(self): # Firefox headless模式运行 options = webdriver.FirefoxOptions() options.add_argument('-headless') self.driver = webd 阅读全文
posted @ 2023-10-20 11:33 CrossPython 阅读(427) 评论(0) 推荐(0) 编辑
摘要: selenium已经停止了对PhantomJS的支持,只能调用Firefox或者Chrome浏览的无头模式(即没有浏览器界面)。使用步骤: 安装Firefox浏览器firefox历年版本安装包的官方镜像地址:https://download-installer.cdn.mozilla.net/pub 阅读全文
posted @ 2023-10-20 10:45 CrossPython 阅读(604) 评论(0) 推荐(0) 编辑
摘要: 1. 修改用户postgres的密码PostgreSQL数据库默认创建管理员账号:postgres;修改其密码,仅需一下三步: 1、首先,登录PostgreSQL sudo -u postgres psql postgres -p 54322、然后,修改账号postgres的密码 ALTER USE 阅读全文
posted @ 2023-10-18 21:29 CrossPython 阅读(1022) 评论(0) 推荐(0) 编辑
摘要: 修改配置文件:sudo vim /etc/postgresql/9.5/main/pg_hba.conf,在文件中添加 host all all 0.0.0.0/0 md5。 all :匹配任何IP地址。 0.0.0.0/0:对于所有IPv4地址,允许任何ip地址以任何用户身份连接任何数据;::0/ 阅读全文
posted @ 2023-10-17 19:28 CrossPython 阅读(347) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>html 表格导出道</title> <script language="JavaScript" type="text/javascript"> //第一种方法 阅读全文
posted @ 2023-10-16 16:04 CrossPython 阅读(11124) 评论(0) 推荐(0) 编辑
摘要: use rsautogui::mouse; use std::thread::sleep; use std::time::Duration; use anyhow::{self, Ok}; fn run(x: u16) ->Result<(), anyhow::Error>{ let timesec 阅读全文
posted @ 2023-10-16 10:47 CrossPython 阅读(44) 评论(0) 推荐(0) 编辑
摘要: server { server_name erp.shudou.cn listen 80; location / { proxy_pass http://127.0.0.1:8069; } } server { server_name shudou.cn www.shudou.cn listen 8 阅读全文
posted @ 2023-10-15 19:54 CrossPython 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 静态: STATIC_URL = 'static/'STATIC_ROOT = os.path.join(BASE_DIR, 'static')STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), # 上线部署后把这删除, 以免和上面的冲突.) 阅读全文
posted @ 2023-10-15 19:39 CrossPython 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 用户拓展 https://www.jb51.net/article/283886.htm https://www.jb51.net/article/167864.htm 阅读全文
posted @ 2023-10-15 11:38 CrossPython 阅读(4) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/weixin_38649779/article/details/131911893 sourcedefenderhttps://dev.to/richard_scott/encryption-for-protecting-python-source-cod 阅读全文
posted @ 2023-10-14 22:14 CrossPython 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 全新安装的odoo,但启动时出现relation "ir_module_module" does not exist,以为是数据库要手动初始化,所以也在启动时加入-i base -d odoo13的命令,但也无效,注释addons_path就ok,但路径检查过是没有问题的,待启动之后,再打开addo 阅读全文
posted @ 2023-10-14 20:21 CrossPython 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 重新复习一下,好多年没碰了.都快忘光了.. https://blog.csdn.net/weixin_51550438/article/details/124669218 from django.db import models #定义图书模型类Book class Book(models.Mode 阅读全文
posted @ 2023-10-14 09:15 CrossPython 阅读(7) 评论(0) 推荐(0) 编辑
摘要: django-vue-admin = django+vue+elementui, 没有适配小屏likeadmin(Python版) = fastapi, vue, elementuivue-elementUI后台管理系统vue-next-admin = 基于vue3.x 、Typescript、vi 阅读全文
posted @ 2023-10-13 21:10 CrossPython 阅读(11) 评论(0) 推荐(0) 编辑
摘要: exportToExcel() { var fileName = "最新质量等级成本"; const csv = this.convertToCSV(this.datas); // 将数据转换为CSV格式 const blob = new Blob([csv], { type: 'text/csv; 阅读全文
posted @ 2023-10-13 17:24 CrossPython 阅读(132) 评论(0) 推荐(0) 编辑
摘要: odoo字段定义的时候,可以使用同模型中其他值进行操作,下面列举常用的操作 用作related计算字段1 = fields.Char(related='字段2.字段xxx')字段2 = fields.Many2one('模型名')如果字段2是关系型字段many2one,引号中可以用点.引用该字段对应 阅读全文
posted @ 2023-10-12 18:52 CrossPython 阅读(56) 评论(0) 推荐(0) 编辑
摘要: cd e:\Programe Files\PostgreSQL\11\bin psql -d ethgateway -U ethgateway -f D:\Desktop\db.sql然后要求输入密码, 即可. 阅读全文
posted @ 2023-10-12 16:43 CrossPython 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1 命令行方式启动odoopython odoo-bin shell -c odoo.conf 2 卸载出问题的模块>>> self.env['ir.module.module'].search([('name', 'like', '需要卸载的模块名')]).button_immediate_uni 阅读全文
posted @ 2023-10-11 20:59 CrossPython 阅读(65) 评论(0) 推荐(0) 编辑
摘要: def customize_create_user(self): a = self.env['res.partner'].create({'name': 'abcde'}) self.env['res.users'].create({'active': True, 'partner_id': a.i 阅读全文
posted @ 2023-10-11 11:06 CrossPython 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-10-10 16:52 CrossPython 阅读(7) 评论(0) 推荐(0) 编辑
摘要: https://github.com/vuejs-templates/webpack 下载之后,解压到本地用户目录下的.vue-templates目录下。 vue init webpack my-login-library 命令的时候,需要带上参数--offline表示离线初始化 阅读全文
posted @ 2023-10-10 16:06 CrossPython 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 安装 node.js npm install webpack webpack-cli webpack-dev-server -g npm i -g @vue/cli-init 项目阶段: vue init webpack sdt npm i element-ui -S cd sdt npm run 阅读全文
posted @ 2023-10-10 15:19 CrossPython 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 问题1:expected indentation of 0 spaces but found 2 . 解决方案:1.打开 /config/index.js文件 ,找到: // 将 true更改为false即可 useEslint: false, 2.打开根目录下的/.eslintrc.js文件,找到 阅读全文
posted @ 2023-10-10 14:36 CrossPython 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 看过作者的自述后, 再重新看一下这个框架, 感觉又有一些新的体会... 为什么要写这个框架 因为我笨,无法学会使用 actix-web 等现存的框架。当我想把以前的 go 的 web 服务使用 rust 实现时,一眼看去,似乎每个框架都比 go 里存在框架复杂, 本来 Rust 的学习曲线就够陡峭的 阅读全文
posted @ 2023-10-08 21:40 CrossPython 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 1. 新建report目录-新建报表xml文件material_storage_pdf.xml 2. 定义xml文件报表参数参数 ir.actions.report报表属性 name:打印动作按钮下的报表名字model:你的报表相关的模型,也就是说是你下载pdf中,pdf中数据的来源report_t 阅读全文
posted @ 2023-10-08 13:06 CrossPython 阅读(349) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 23 下一页