冲刺no.2

被分配完成了登录注册到数据库的链接
通过orm(对象映射)链接到数据库
{% extends 'base.html' %}

{% block title %}注册{% endblock %}

{% block head %}
    <link rel="stylesheet" href="{{url_for('static',filename='css/login_regist.css')}}">
{% endblock %}

{% block main %}
    <h3 class="page-title">注册</h3>
    <form action="" method="POST">
        <div class="form-container">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="手机号码" name="telephone">
            </div>
            <div class="form-group">
                <input type="text" class="form-control" placeholder="用户名" name="username">
            </div>
            <div class="form-group">
                <input type="password" class="form-control" placeholder="密码" name="password1">
            </div>
            <div class="form-group">
                <input type="password" class="form-control" placeholder="确认密码" name="password2">
            </div>
            <div class="form-group">
                <button class="btn btn-primary btn-block">立即注册</button>
            </div>
        </div>
    </form>
{% endblock %} 
 
 
 {% extends 'base.html' %}

{% block title %}登录{% endblock %}

{% block head %}
    <link rel="stylesheet" href="{{url_for('static',filename='css/login_regist.css')}}">
{% endblock %}

{% block main %}
    <h3 class="page-title">登录</h3>
    <form action="" method="POST">
        <div class="form-container">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="手机号码" name="telephone">
            </div>
            <div class="form-group">
                <input type="password" class="form-control" placeholder="密码" name="password">
            </div>
            <div class="form-group">
                <button class="btn btn-primary btn-block">登录</button>
            </div>
        </div>
    </form>
{% endblock %}
 
 
 
本次小组试验参考了Flask大型项目http://www.pythondoc.com/flask-mega-tutorial/
posted @ 2017-11-15 22:11  Im_okay  阅读(110)  评论(0编辑  收藏  举报