冲刺no.2
Posted Im_okay
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了冲刺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 %}
{% 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 %}
{% 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/
以上是关于冲刺no.2的主要内容,如果未能解决你的问题,请参考以下文章