标签:debug html route title lan href name 注册 __name__
from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route(‘/‘)
def index():
return render_template(‘index.html‘)
@app.route(‘/wr‘)
def wr():
return render_template(‘wr.html‘)
@app.route(‘/login‘)
def login():
return render_template(‘login.html‘)
if __name__ == ‘__main__‘:
app.run(debug=True)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <li><a href="{{ url_for(‘index‘) }}"></a></li> <li><a href="{{ url_for(‘login‘) }}">登陆</a></li> <li><a href="{{ url_for(‘wr‘) }}">注册</a></li> </body> </html>
标签:debug html route title lan href name 注册 __name__
原文地址:http://www.cnblogs.com/caoxinwen092/p/7779505.html