标签:bsp for har import div end app imp link
from flask import Flask,render_template import config app=Flask(__name__) app.config.from_object(config) # 首页 @app.route(‘/‘) def index(): return render_template(‘index.html‘) #登录 @app.route(‘/login/‘) def login(): return render_template(‘login.html‘) #注册 @app.route(‘/enroll/‘) def enroll(): return render_template(‘enroll.html‘) if __name__ == ‘__main__‘: app.run(debug=True)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>首页</title> <link rel="stylesheet" type="text/css" href="{{ url_for(‘static‘,filename=‘css/index.css‘) }}"> </head> <body> <img src="http://www.logo71.com/uploads/allimg/130606/8-1306061335461b.jpg" alt="wo" width="50px"> <a href="{{ url_for(‘index‘) }}">首页</a> <a href="{{ url_for(‘login‘) }}">登录</a> <a href="{{ url_for(‘enroll‘) }}">注册</a> </body> </html>
标签:bsp for har import div end app imp link
原文地址:http://www.cnblogs.com/yangjlee/p/7779372.html