标签:避免 _for meta oct cli 登录 rman code 个人版
untitled
from flask import Flask,render_template app = Flask(__name__) @app.route(‘/‘) def base(): return render_template(‘base.html‘) @app.route(‘/load/‘) def load(): return render_template(‘load.html‘) @app.route(‘/register/‘) def register(): return render_template(‘register.html‘) if __name__ == ‘__main__‘: app.run()
base.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> {% block title %}{% endblock %} 首页 </title> <link rel="stylesheet" type="text/css" href="{{ url_for(‘static‘,filename=‘css/base.css‘) }}"> <script src="{{ url_for(‘static‘,filename=‘js/base.js‘) }}"></script> {% block head %} {% endblock %} </head> <body id="myBody"> <nav> <img src="http://p1.img.cctvpic.com/photoAlbum/page/performance/img/2013/8/27/1377583188891_732.jpg" width="800px"height="150px"><br> <img id="myOnOff" onclick="mySwitch()" src="http://www.runoob.com/images/pic_bulbon.gif" width="25px"> <a href="http://www.sesamestreetchina.com.cn/">首页</a> <input type="text"name="search"> <button type="submit">搜索</button> <a href="{{ url_for(‘login‘) }}">登录</a> <a href="{{ url_for(‘regist‘) }}">注册</a> <img src="{{ url_for(‘static‘,filename=‘image/86x97sZ11K4.jpg‘) }}" alt="" width="50px"> </nav> <div class="area"> {% block main %} {% endblock %} </div> <footer> <div class="footer_box"> Copyright@2017 个人版权,版权所有 作者:杨碧茜</div> </footer> </body> </html>
标签:避免 _for meta oct cli 登录 rman code 个人版
原文地址:http://www.cnblogs.com/yybx/p/7779509.html