标签:gis from log dex 不同 end meta app run
from flask import Flask,render_template app = Flask(__name__) @app.route(‘/‘) def index(): return render_template(‘index.html‘) @app.route(‘/login/‘,methods=[‘GET‘,‘POST‘]) def login(): return render_template(‘login.html‘) @app.route(‘/regist/‘) def regist(): return render_template(‘regist.html‘) if __name__ == ‘__main__‘: app.run(debug=True)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>首页</title> <link href="../static/css/wow.css" rel="stylesheet" type="text/css"> </head> <body> <a href="http://127.0.0.1:5000/">首页</a> <a href="http://127.0.0.1:5000/login/">登录</a> <a href="http://127.0.0.1:5000/regist/">注册</a> <h1>首页</h1> </body> </html>
标签:gis from log dex 不同 end meta app run
原文地址:http://www.cnblogs.com/yeyuanchao/p/7780551.html