07 2021 档案

摘要:程序上线之前要在py文件的host访问设置好端口号 if __name__ == '__main__': # app.run(debug=True) app.run(host='0.0.0.0', port=5001) 然后到云服务器配置访问安全规则,把对应的端口号开放了 域名解析 阅读全文
posted @ 2021-07-23 14:27 FishMan552 阅读(214) 评论(0) 推荐(0)
摘要:render_templates 渲染模板 * 模板放在 templates 文件夹下 * 从 flask 中导入 render_templates 函数 * 在视图函数中,使用render_templates,只需要写模板 名称.html ,不需要写路径 除非是在templates下在创建子目录就 阅读全文
posted @ 2021-07-18 22:07 FishMan552 阅读(71) 评论(0) 推荐(0)
摘要:备份数据库表: 从A数据库的1表备份到B数据库的2表 INSERT INTO databaseB.table2 SELECT * FROM database1.table1 插入多列数据 INSERT INTO table_name (列1, 列2,...) VALUES ('值1', '值2',. 阅读全文
posted @ 2021-07-17 16:39 FishMan552 阅读(29) 评论(0) 推荐(0)
摘要:这里的服务器是centOS8.2 查看服务器系统 cat /etc/redhat-release 安装nginx , 不用在虚拟环境下安装。 sudo yum install nginx nginx 默认安装的目录,vim打开修改配置文件 vim /etc/nginx/nginx.conf PS: 阅读全文
posted @ 2021-07-16 15:49 FishMan552 阅读(296) 评论(0) 推荐(0)