九十二:CMS系统之cms后台登录界面
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后台登录界面的更多相关文章
- 转载-30分钟搞定后台登录界面(103个后台PSD源文件、素材网站)
原文:30分钟搞定后台登录界面(103个后台PSD源文件.素材网站) 目录 一.界面预览 二.PSD源文件预览 三.工具分享 四.资源说明 五.素材下载网站 六.下载 去年八月时要做一个OA系统为 ...
- Y460 安装ubuntu 12.04系统黑屏,登录界面黑屏
ubuntu 12.04系统黑屏,登录界面黑屏,但是命令行界面可以登录,也可以正常使用,当时在装CVS,装完重启就这样了,可能是因为前一天装更新时,突然断电导致图形界面损坏,参考他人方法,终于修复,总 ...
- ubuntu 12.04系统黑屏,登录界面黑屏
ubuntu 12.04系统黑屏,登录界面黑屏 原文链接:http://www.2cto.com/os/201305/213737.html 1.硬件环境 Intel® Core™ i5- ...
- 九十四:CMS系统之cms后台登录限制
装饰器,验证当前session中是否存在定义的user_id,没有就重定向到登录页 from flask import session, redirect, url_forfrom functools ...
- 九十三:CMS系统之cms后台登录功能
config form from wtforms import Form, StringField, IntegerFieldfrom wtforms.validators import Email, ...
- 30分钟搞定后台登录界面(103个后台PSD源文件、素材网站)
去年八月时要做一个OA系统为了后台界面而烦恼,后来写了一篇博客(<后台管理UI的选择>)介绍了选择过程与常用后台UI,令我想不到的时竟然有许多开发者与我一样都为这个事情而花费不少时间,最后 ...
- 九十六:CMS系统之cms后台用户名渲染和注销功能
用户名渲染,使用flask的g对象,在用户请求进来之后,触发视图函数之前,拿用户的信息,放到g对象里面 @bp.before_requestdef before_request(): "&q ...
- 九十五:CMS系统之cms后台模板渲染
定义一个宏,用于渲染static文件的时候,只需要传文件名就可以,上下两个“-”是解决渲染的时候源代码换行的情况 {% macro static(filename) -%} {{ url_for('s ...
- 九十一:CMS系统之cms用户模型定义
数据库信息 DEBUG = TrueSQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:123456@127.0.0.1:3306/test'SQLALCH ...
随机推荐
- Vue介绍:vue导读1
一.什么是vue 二.如何在页面中使用vue 三.vue的挂载点 四.vue的基础指令 一.什么是vue 1.什么是vue vue.js十一个渐进式javascript框架 渐进式:vue从控制页面中 ...
- 【cli命令集】
1.调高bug等级 查看现在蜂窝目前sla情况 ROUTER> enable ROUTER# core set debug 18Core debug was 0 and is now 18Cor ...
- 三种方式构建C#单例模式
/// <summary> /// 双检锁实现单例 /// </summary> public sealed class SingletonDoubleCheck { //s_ ...
- linux——常用命令
学习linux命令地址: 学习命令地址,可参考http://linux.51yip.com/ 在文件中搜索指定字符串 grep -i "requirepass" redis.con ...
- c语言啊
双链表 quacklist 内核 模块加载
- python pip 'nonetype' object has no attribute 'bytes'
python pip 'nonetype' object has no attribute 'bytes' 更新 pip for Windows : python -m pip install -U ...
- go包中的init() 函数
https://tutorialedge.net/golang/the-go-init-function/ ---------------------------------------------- ...
- bug-- java.lang.RuntimeException: Type “Klass*"
使用jinfo查看jvm进程id为27523的信息 [java@xftest0 ~]$ jinfo 27523 Attaching to process ID 27523, please wa ...
- TCP/IP协议簇 端口 三次握手 四次挥手 11种状态集
第一章:概念介绍 1.1 VLAN 1.1.1 什么是VLAN VLAN (Virturl LAN) ,翻译成中文是:“虚拟局域网”.VLAN可以是由少数几台家用计算机构成的网络,也可以是数以百计的计 ...
- 【数位贪心】loj#530. 「LibreOJ β Round #5」最小倍数
记录一下题解里写的算法四 题目描述 $1 \le T \le 10^4,1\le m\le 100,0\le a_i\le 10^{18}$. 题目分析 题解里的算法四是这么写的 主要是这个$\alp ...