登录后台

页面导航

import flask

# 生成一个flask app
app = flask.Flask(__name__)


# 根目录 (其实我也不太懂)
@app.route("/")
def testflask():
    try:
        dk = open("index.html", "rb")
        data = dk.read()
        dk.close()
        return data
    except Exception as err:
        return str(err)


if __name__ == ("__main__"):
    app.run()