赞
踩
Flask 小而灵活的Python Web开发神器,半小时即可入门。
ECharts 使用 JavaScript 编写的开源可视化库,涵盖各行业图表,满足各种需求,重点是开源免费。
Flask+Echarts 人见人爱,花见花开
一、先来个案例安利一下
1、项目目录结构
2、demo.py 实现
from flask import Flask,render_template
app = Flask(__name__)
@app.route("/")
def index():
return render_template("echarts_demo.html")
if __name__ == '__main__':
app.run(debug=True)
3、echarts_demo.html实现
以下内容只需要了解格式,拷贝官网实现就可以了
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Echarts-Demo</title>
<script src="/static/echarts.js"></script>
</head>
<body>
<body>
<!-- 为 ECh
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。