上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 38 下一页
摘要: 在<style></style>中添加下面代码 table { table-layout: fixed; /* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */ } table td { position: relative; /*width: 80px;*/ height: 阅读全文
posted @ 2023-03-21 14:43 坚强的小蚂蚁 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 一. 常用定位方法 1.根据文本值定位元素 查找文本值为DNS的div元素 text1 = html.xpath("//div[text()='DNS']") text2 = html.xpath("//div[text()='DNS']/text()") #获取这个div对象的文本值 2.不选择某 阅读全文
posted @ 2023-03-17 17:26 坚强的小蚂蚁 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 一. 环境准备 pip install Django==2.2 -i https://pypi.douban.com/simple pip install djangorestframework==3.10 -i https://pypi.douban.com/simple pip install 阅读全文
posted @ 2023-03-15 15:33 坚强的小蚂蚁 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 拷贝element-ui例子时,head中引用时可能需要注意下 1. table的例子 <html lang="en"> <head> <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script> <script src 阅读全文
posted @ 2023-03-09 17:41 坚强的小蚂蚁 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 一. 改变容器存储位置 默认存储位置是/var/lib/docker 1.停止docker systemctl stop docker 有时候会报错Warning: Stopping docker.service, but it can still be activated by: docker.s 阅读全文
posted @ 2023-03-08 10:40 坚强的小蚂蚁 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1. 给文件夹创建软链接 首先创建一个真实的文件夹 cd / mkdir test1 然后在data目录下创建软链接 cd /data ln -s /test1 test-soft 2. 在软链接目录下新建一个2G的文件 dd if=/dev/urandom of=3.txt bs=1M count 阅读全文
posted @ 2023-03-07 14:10 坚强的小蚂蚁 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 未测试 示例3:server{ listen 80; server_name www.aming.com; return 200 "hello";}说明:如果要想返回字符串,必须要加上状态码,否则会报错。还可以支持json数据 示例4:location ^~ /aming { default_typ 阅读全文
posted @ 2023-03-06 10:06 坚强的小蚂蚁 阅读(754) 评论(0) 推荐(0) 编辑
摘要: 在db_tools目录下新建2个脚本文件import_category_data.py,import_goods_data.py 来生成数据 2. 独立使用model导入数据,上面的脚本文件开头如下写,以 import sys import os #把当前路径加入到系统路径中,方便import 上面 阅读全文
posted @ 2023-02-22 17:03 坚强的小蚂蚁 阅读(32) 评论(0) 推荐(0) 编辑
摘要: on_delete = models.CASCADE #删除关联数据,与之关联也被删除 on_delete = models.DO_NOTHING #删除关联数据,什么也不做 on_delete = models.PROTECT #删除关联数据,引发错误ProtectedError on_delet 阅读全文
posted @ 2023-02-21 11:18 坚强的小蚂蚁 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 一. 使用Git bash操作 1. 准备条件与初始化 新建一个文件夹dm-config cd dm-config #初始化 git init #全局配置添加邮箱和用户名 git config --global user.name "jack" git config --global user.em 阅读全文
posted @ 2023-02-15 17:48 坚强的小蚂蚁 阅读(461) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 38 下一页