基于Django的轻量级接口测试平台二
Posted yjlch1016
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了基于Django的轻量级接口测试平台二相关的知识,希望对你有一定的参考价值。
QQ群:529063263
GitHub:https://github.com/yjlch1016/dapi
一、登录页login.html:
% load static %
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta name="robots" content="NONE,NOARCHIVE"/>
<title>登录 | 测试平台</title>
<link href="% static ‘xadmin/vendor/bootstrap/css/bootstrap.css‘ %"
type="text/css" media="screen" rel="stylesheet">
<link rel="stylesheet" type="text/css" id="site-theme"
href="% static ‘xadmin/css/themes/bootstrap-xadmin.css‘ %"/>
<link href="% static ‘xadmin/vendor/font-awesome/css/font-awesome.css‘ %"
type="text/css" media="screen" rel="stylesheet">
<link href="% static ‘xadmin/css/xadmin.main.css‘ %"
type="text/css" media="screen" rel="stylesheet">
<link href="% static ‘xadmin/css/xadmin.plugins.css‘ %"
type="text/css" media="screen" rel="stylesheet">
<link href="% static ‘xadmin/css/xadmin.responsive.css‘ %"
type="text/css" media="screen" rel="stylesheet">
<script type="text/javascript"
src="% static ‘xadmin/vendor/jquery/jquery.js‘ %"></script>
<style type="text/css">
#panel-login
max-width: 350px;
#panel-login .controls
padding: 0px 15px 15px !important;
#panel-login .alert-block
padding: 0px;
#panel-login .alert-block ul
margin: 10px 15px;
padding-left: 0px;
#panel-login .alert-block ul li
list-style-type: none;
</style>
</head>
<body class="login">
<div class="container">
<form action="/login/" method="post" id="login-form">
% csrf_token %
# 登录表单 #
# 防止csrf跨站请求伪造 #
<div class="panel panel-default panel-single" id="panel-login">
<div class="panel-heading">
<h2 class="form-signin-heading" align="center">测试平台</h2>
<img src="/static/img/img_login.gif" align="center" alt="人生苦短,我用Python">
</div>
<div class="panel-body">
<div id="div_id_username"