摘要: 1 GET get请求,flask:user_name = request.args.get('user_name') 2 POST 携带一般数据data 3 POST 携带json数据 4 POST <!--?xml version="1.0" encoding="UTF-8"?--> 传cook 阅读全文
posted @ 2018-05-26 17:34 Adamanter 阅读(5853) 评论(0) 推荐(0) 编辑
摘要: 1 渲染模板 阅读全文
posted @ 2018-05-26 17:24 Adamanter 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1 datetime 2 简单封装以及获取毫秒级别时间差和微秒级别时间差 阅读全文
posted @ 2018-05-26 17:22 Adamanter 阅读(21128) 评论(0) 推荐(0) 编辑
摘要: 1 nginx+flask 这个用于服务器代码直接测试用,程序停启频繁,flask run就可以 2 nginx + uwsgi + flask 这个用于服务器生产环境,不轻易停止启动,要用uwsgi 启动 3 nginx + uwsgi + flask +API网关:kong 当web服务器上需要 阅读全文
posted @ 2018-05-26 17:09 Adamanter 阅读(498) 评论(0) 推荐(0) 编辑
摘要: markdown语法,临时记录,复制修改 阅读全文
posted @ 2018-05-26 16:37 Adamanter 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 1 安装 pip install Flask-PyMongo chapip list | grep pymongo 2 集成进入flask框架 app中配置: 'MONGO_URI': 'mongodb://localhost:27017/sydc', 'MONGO_USERNAME': 'root 阅读全文
posted @ 2018-05-26 16:33 Adamanter 阅读(601) 评论(0) 推荐(0) 编辑
摘要: 1 安装和启动 安装:apt-get install mongodb 启动:sudo mongod 可视化工具robomogo:https://robomongo.org/download 2 创建数据库管理员和给数据库设置用户名和密码 创建mongodb数据库管理员 > use adminswit 阅读全文
posted @ 2018-05-26 16:22 Adamanter 阅读(119) 评论(0) 推荐(0) 编辑
摘要: (1)查看阿里云服务器环境 ssh root@47.92.xxx.7 你自己的阿里云IP地址 uname -a Linux adamanter 4.4.0-105-generic #128-Ubuntu SMP Thu Dec 14 12:42:11 UTC 2017 x86_64 x86_64 x 阅读全文
posted @ 2018-05-26 14:39 Adamanter 阅读(336) 评论(0) 推荐(0) 编辑
摘要: (1)在提交之前,你本地代码先backup!!! (2)github先建仓库 去https://github.com登录账户去创建仓库helloworld(你代码工程名字),你本地的文件比如helloworld里面的文件会进入这个文件夹里面 生成仓库地址比如:https://github.com/s 阅读全文
posted @ 2018-05-26 13:31 Adamanter 阅读(137) 评论(0) 推荐(0) 编辑