标签:文件 extend register button utf-8 ott mail ace container
from flask import Flask,render_template app = Flask(__name__) @app.route(‘/‘) def index(): return render_template(‘index.html‘) @app.route(‘/login/‘) 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>{% block titile%}{% endblock %}MIS15</title> </head> <body> {% block main %} <a href="http://127.0.0.1:5000">首页</a> <a href="http://127.0.0.1:5000/login">登录</a> <a href="{{ url_for(‘regist‘) }}">注册</a> <h1>MIS问答平台</h1> <h4>2015</h4> <P></P> <div id="container" style="width:400px " > <div id="header" style="background-color:#97ceff;"><h2 align="center" style="margin-bottom:0;">登录</h2></div> <form> <input type="text" name="usertname"placeholder="请输入用户名"><br> <input type="password" name="password"placeholder="请输入六位数密码"><br> <input type="radio" name="role" value="stu">student <input type="radio" name="role" value="stu">teather<br> <input type="button" value="确定"> </form> <div id="footer" style="background-color:#ffa7d7;clear:both;text-align:center;">版权 ? yan</div> <form> <select> <option>问答</option> <option>收藏</option> </select> </form> <ol> <li>python</li> <li>html</li> </ol> </div> <hr> <p>友情链接</p> <a href="http://www.gzcc.cn/"> <img src="http://www.gzcc.cn/2016/images/banner.png" width="400" height="50" alt="gzcc.cn" /> <br>广州商学院 </a> {% endblock %} </body> </html>
{% extends ‘index.html‘ %} {% block titile %} 登陆 {% endblock %} {% block head %} <head> <link href="../static/css/text.css" rel="stylesheet" type="text/css"> <script src="../static/js/text.js"></script> </head> <body> <div class="box"> <h2>欢迎进入</h2> <h3>登录界面</h3> <div class="input_box"> <input id="uname" type="text" placeholder="请输入用户名"> </div> <div class="input_box"> <input id="upass" type="password" placeholder="请输入密码"> </div> <div id="error_box"><br></div> <div class="input_box"> <button onclick="myLogin()">登陆</button> </div> </div> </body> </html> {% endblock %}
{% extends ‘index.html‘ %} {% block titile %} 注册 {% endblock %} {% block head %} <head> <link href="../static/css/text.css" rel="stylesheet" type="text/css"> <script src="../static/js/text.js"></script> </head> <body> <div class="box"> <h2>欢迎进入</h2> <h3>VIP Register</h3> <div class="input_box"> 请输入邮箱 <input id="email" type="text" placeholder="需要通过邮件激活账户"> </div><br> <div class="input_box"> 请输入账号 <input id="uname" type="text" placeholder="请输入你的昵称"> </div><br> <div class="input_box"> 请输入密码 <input id="upass" type="password" placeholder="请输入密码"></div><br> <div class="input_box"> 再输入密码 <input id="upass1" type="password" placeholder="第二次输入密码"></div><br> <div id="error_box"><br></div> <div class="input_box"> <button onclick="fnLogin()" >注册</button></div> </div> </body> </html> {% endblock %}
标签:文件 extend register button utf-8 ott mail ace container
原文地址:http://www.cnblogs.com/qq724852210/p/7806358.html