html

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content=""> <title>登录</title>
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="{{ url_for('static', filename='css/cms/signin.css') }}" rel="stylesheet">
</head> <body> <div class="container"> <form class="form-signin" method="post">
<h2 class="form-signin-heading">登录</h2>
<label for="inputEmail" class="sr-only">邮箱</label>
<input type="email" name="email" id="inputEmail" class="form-control" placeholder="邮箱" required autofocus>
<label for="inputPassword" class="sr-only">密码</label>
<input type="password" name="password" id="inputPassword" class="form-control" placeholder="密码" required>
<div class="checkbox">
<label>
<input type="checkbox" name="remember" value="1">记住我
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">点击登录</button>
</form> </div>
</body>
</html>

css

body {
padding-top: 40px;
padding-bottom: 40px;
background-color: #eee;
} .form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
height: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}

视图

from flask import Blueprint, views, render_template

bp = Blueprint('cms', __name__, url_prefix='/cms')

class LoginView(views.MethodView):

    def get(self):
return render_template('cms/cms_login.html') def post(self):
pass bp.add_url_rule('/login/', view_func=LoginView.as_view('login'))

访问

九十二:CMS系统之cms后台登录界面的更多相关文章

  1. 转载-30分钟搞定后台登录界面(103个后台PSD源文件、素材网站)

    原文:30分钟搞定后台登录界面(103个后台PSD源文件.素材网站)   目录 一.界面预览 二.PSD源文件预览 三.工具分享 四.资源说明 五.素材下载网站 六.下载 去年八月时要做一个OA系统为 ...

  2. Y460 安装ubuntu 12.04系统黑屏,登录界面黑屏

    ubuntu 12.04系统黑屏,登录界面黑屏,但是命令行界面可以登录,也可以正常使用,当时在装CVS,装完重启就这样了,可能是因为前一天装更新时,突然断电导致图形界面损坏,参考他人方法,终于修复,总 ...

  3. ubuntu 12.04系统黑屏,登录界面黑屏

    ubuntu 12.04系统黑屏,登录界面黑屏 原文链接:http://www.2cto.com/os/201305/213737.html   1.硬件环境     Intel® Core™ i5- ...

  4. 九十四:CMS系统之cms后台登录限制

    装饰器,验证当前session中是否存在定义的user_id,没有就重定向到登录页 from flask import session, redirect, url_forfrom functools ...

  5. 九十三:CMS系统之cms后台登录功能

    config form from wtforms import Form, StringField, IntegerFieldfrom wtforms.validators import Email, ...

  6. 30分钟搞定后台登录界面(103个后台PSD源文件、素材网站)

    去年八月时要做一个OA系统为了后台界面而烦恼,后来写了一篇博客(<后台管理UI的选择>)介绍了选择过程与常用后台UI,令我想不到的时竟然有许多开发者与我一样都为这个事情而花费不少时间,最后 ...

  7. 九十六:CMS系统之cms后台用户名渲染和注销功能

    用户名渲染,使用flask的g对象,在用户请求进来之后,触发视图函数之前,拿用户的信息,放到g对象里面 @bp.before_requestdef before_request(): "&q ...

  8. 九十五:CMS系统之cms后台模板渲染

    定义一个宏,用于渲染static文件的时候,只需要传文件名就可以,上下两个“-”是解决渲染的时候源代码换行的情况 {% macro static(filename) -%} {{ url_for('s ...

  9. 九十一:CMS系统之cms用户模型定义

    数据库信息 DEBUG = TrueSQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:123456@127.0.0.1:3306/test'SQLALCH ...

随机推荐

  1. php-fpm优化内存占用大

    1.1 Linux的php-fpm优化心得-php-fpm进程占用内存大和不释放内存问题 LNMP架构中PHP是运行在FastCGI模式下,按照官方的说法,php-cgi会在每个请求结束的时候会回收脚 ...

  2. Java web中文乱码

    1.设置工程的编码方式 window-preferences-general-workspace 改成uef-8 2.设置html的编码方式 <meta http-equiv="Con ...

  3. c#系统泛型委托

    Action<T> 无返回值的系统泛型委托 namespace ConsoleApp1 { public class UserInfo { public int Id { get; set ...

  4. [Functional Programming] Reader with Async ADT

    ReaderT is a Monad Transformer that wraps a given Monad with a Reader. This allows the interface of ...

  5. @Import注解的作用

    在@Import注解的参数中可以填写类名,例如@Import(Abc.class),根据类Abc的不同类型,spring容器有以下四种处理方式: 1. 如果Abc类实现了ImportSelector接 ...

  6. javascript JSON.parse and JSON.stringify

    var jstu = '{"name": "xiaoqiang", "age": 18}'; console.log(jstu); var ...

  7. bat 通过命令以管理员方式运行程序

    @echo off mode con lines= cols= % mshta vbscript:CreateObject()(window.close)&&exit cd /d &q ...

  8. CodeForces–830B--模拟,树状数组||线段树

    B. Cards Sorting time limit per test 1 second memory limit per test 256 megabytes input standard inp ...

  9. 追本溯源:substr与substring历史漫话

    引子: 很多时候,当我要字符串截取时,我会想到substr和substring的方法,但是具体要怎么传参数时,我总是记不住.哪个应该传个字符串长度,哪个又应该传个开始和结尾的下标,如果我不去查查这两个 ...

  10. Linux: Block Port With IPtables

    由Internet和其他网络协议识别端口号,使计算机能够与其他人进行交互.每个Linux服务器都有一个端口号(参见/ etc / services文件) Block Incoming Port The ...