随笔分类 -  python-tornado web框架

摘要:class coachpic(RequestHandler): @gen.coroutine def post(self): picurl = self.request.files['picurl'][0] print("picurl:{}".format(picurl)) ret = yield self.editpic(picu... 阅读全文
posted @ 2019-05-30 23:33 saintdingtheGreat 阅读(442) 评论(0) 推荐(0)
摘要:supervisord常见命令 生成配置文件 编辑配置文件 nginx配置(一个地址多个站点) upstream tornados{ server 127.0.0.1:8989; #可以发现这里8989端口与supervisord中的端口一致 server 127.0.0.1:8021; serve 阅读全文
posted @ 2019-05-27 17:30 saintdingtheGreat 阅读(851) 评论(0) 推荐(0)
摘要:作者:StormerX链接:https://www.jianshu.com/p/d8901ce4712b来源:简书简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。 $ supervisord -c /etc/supervisor/supervisord.conf Error: A 阅读全文
posted @ 2019-05-27 14:21 saintdingtheGreat 阅读(794) 评论(0) 推荐(0)
摘要:总体思路:基于bootstrap4的前端页面上传组件,把excel文件上传至服务器,并利用python pandas读取里面的数据形成字典列表 通过pymongo 接口把数据插入或追加到mongodb相关集合中 html部分 jquery部分:其中24-26行是确保ajax提交成功的关键 torna 阅读全文
posted @ 2019-03-01 01:08 saintdingtheGreat 阅读(231) 评论(0) 推荐(0)
摘要:from tornado.web import RequestHandler from pymongo import MongoClient import pandas,xlrd from pandas import DataFrame,Series import json import os import time currentpath =os.getcwd() class multiup... 阅读全文
posted @ 2019-02-28 22:50 saintdingtheGreat 阅读(340) 评论(0) 推荐(0)
摘要:html部分 使用了form表单,注意三要素 method="post" action="/loaddata" enctype="multipart/form-data" python部分 阅读全文
posted @ 2019-02-27 17:03 saintdingtheGreat 阅读(403) 评论(0) 推荐(0)
摘要:get提交部分 相关RequestHandler 前端response数据形式(orient=“records”) DataFrame类型转为其他格式的方法 下列部分引自 作者:huanbia 来源:CSDN 原文:https://blog.csdn.net/huanbia/article/deta 阅读全文
posted @ 2019-02-27 13:02 saintdingtheGreat 阅读(173) 评论(0) 推荐(0)
摘要:在项目中引用alembic 协助tornado项目生成数据表结构 alembic revision --autogenerate -m "create tables" 第二步执行 alembic upgrade head 表结构就修改过来了 阅读全文
posted @ 2018-10-30 22:15 saintdingtheGreat 阅读(215) 评论(0) 推荐(0)