摘要: <header> <!-- Bootstrap Library --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="s 阅读全文
posted @ 2021-10-01 19:33 lisicn 阅读(275) 评论(0) 推荐(0) 编辑
摘要: pip install pip install django-cors-headers 后端settings INSTALLED_APPS = [ ... 'corsheaders', ] MIDDLEWARE = [ 'corsheaders.middleware.CorsMiddleware', 阅读全文
posted @ 2021-10-01 19:29 lisicn 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 需求内容: 初始话环境用于运行python Django框架网站,数据库为mysql(docker),反向代理Nginx,版本控制git 系统选择 centos7.6 删除旧版python 默认自带python3.6,安装最新python3.9.7版本 先不安装python,等更新好sqlite3版 阅读全文
posted @ 2021-09-03 10:57 lisicn 阅读(226) 评论(0) 推荐(0) 编辑
摘要: query_set() 根据字典查询数据库,而不是models.phones.object.filter(phone="xxx") # 一种根据多个参数查询数据库的方法 # 理想状态下,我可以传入多个参数,直接查询 # 原文:https://docs.djangoproject.com/en/3.0 阅读全文
posted @ 2021-08-30 14:20 lisicn 阅读(26) 评论(0) 推荐(0) 编辑
摘要: %: curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py %: python get-pip.py 得到大致如下内容: pc@pcMacBook-Pro Documents % python get-pip.py DEPRE 阅读全文
posted @ 2021-07-27 21:37 lisicn 阅读(3216) 评论(0) 推荐(0) 编辑
摘要: 设定后台系统名 admin.AdminSite.site_header = '医院后台' 添加自定义跳转按钮,添加新的列 #整体内容参考https://simpleui.72wo.com/docs/simpleui/quick.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6% 阅读全文
posted @ 2021-06-30 13:01 lisicn 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 一些源 20210628阿里云目前源限速(4M左右带宽,其他均在10M以上) 阿里云 https://mirrors.aliyun.com/pypi/simple/ 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科学技术大学 https://pypi.mi 阅读全文
posted @ 2021-06-28 13:56 lisicn 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 不幸的是,通过DOCKER命令无法更改现有 RUNNING 容器的端口映射(从主机到容器的转发端口)! 因此,在镜像运行的时候或启动端口的时候,要谨慎操作。 通过修改配置文件修改端口 停止容器 docker stop <contanier ID> 停止所有: docker stop $(docker 阅读全文
posted @ 2021-06-21 14:30 lisicn 阅读(1284) 评论(0) 推荐(0) 编辑
摘要: 基本架构: ​ nginx >> supervisor >> Daphne >> websocket 配置 安装daphne #pip install channels #安装结束后会在当前虚拟环境下产生daphne 配置django asgi 配置asgi.py文件(假设你已经做好了websock 阅读全文
posted @ 2021-06-15 09:50 lisicn 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 三、添加标记 案例一,添加船标并绘制行驶轨迹: var myMap = L.map('mapMain').setView([37.55, 122.08], 10); /*定义标记*/ var boatIcon = L.icon({ iconUrl: "{% static 'http_app/inde 阅读全文
posted @ 2021-06-11 17:48 lisicn 阅读(2003) 评论(0) 推荐(0) 编辑