flask获取参数
body, html {
width: 100%;
height: 100%;
}
*, ::after, ::before {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
._2rhmJa {
font-weight: 400;
line-height: 1.8;
margin-bottom: 20px;
}
._3Z3nHf, .ouvJEz {
background-color: #fff;
border-radius: 4px;
margin-bottom: 10px;
}
.ouvJEz {
padding: 24px;
}
._gp-ck {
flex-shrink: 0;
width: 730px;
margin-bottom: 24px;
margin-right: 10px;
}
._3VRLsv {
box-sizing: content-box;
width: 1000px;
padding-left: 16px;
padding-right: 16px;
margin-left: auto;
margin-right: auto;
}
._3VRLsv {
display: flex;
justify-content: center;
align-items: flex-start;
min-height: calc(-66px + 100vh);
padding-top: 10px;
font-size: 16px;
}
._3kbg6I {
background-color: #f9f9f9;
}
body {
margin: 0;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
line-height: 1.5;
-webkit-font-feature-settings: "tnum","tnum";
font-feature-settings: "tnum" 1, "tnum" 1;
}
body {
line-height: 1.4285;
color: #404040;
background-color: #fff;
font-family: -apple-system,BlinkMacSystemFont,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif;
font-feature-settings: "tnum" 1;
font-variant: tabular-nums;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
html {
--antd-wave-shadow-color: #ec7259;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0px;
margin-bottom: 0.5em;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
}
b, h1, h2, h3, h4, h5, h6, strong {
font-weight: 600;
}
h1, h2, h3, h4, h5, h6 {
color: #404040;
text-rendering: optimizelegibility;
}
._2rhmJa h1, ._2rhmJa h2, ._2rhmJa h3, ._2rhmJa h4, ._2rhmJa h5, ._2rhmJa h6 {
margin-bottom: 16px;
}
._2rhmJa h3 {
font-size: 22px;
}
._2Uzcx_ {
position: relative;
overflow: hidden;
}
[role=button], a, area, button, input:not([type=range]), label, select, summary, textarea {
-ms-touch-action: manipulation;
touch-action: manipulation;
}
button, input, optgroup, select, textarea {
margin: 0;
color: inherit;
font-size: inherit;
font-family: inherit;
line-height: inherit;
}
button, input {
overflow: visible;
}
button, select {
text-transform: none;
}
.VJbwyy {
position: absolute;
top: 6px;
right: 6px;
display: flex;
justify-content: center;
align-items: center;
width: 32px;
height: 24px;
cursor: pointer;
font-size: 14px;
padding: 0;
border: none;
border-radius: 6px;
color: #ccc;
background-color: hsla(0, 0%, 90%, 0.2);
box-shadow: 0px 2px 0px 0px rgba(0,0,0,0.25);
opacity: 0;
visibility: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
transition: opacity .2s ease-in-out,visibility .2s ease-in-out;
z-index: 1;
}
[type=reset], [type=submit], button, html [type=button] {
-webkit-appearance: button;
}
code, kbd, pre, samp {
font-size: 1em;
font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;
}
pre {
margin-top: 0px;
margin-bottom: 1em;
overflow: auto;
}
:not(pre) > code[class*=language-], pre[class*=language-] {
background: #2d2d2d;
}
._2rhmJa code, ._2rhmJa pre, ._2rhmJa pre[class*=language-] {
font-family: Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;
font-size: 12px;
}
._2rhmJa code {
padding: 2px 4px;
border: none;
vertical-align: middle;
white-space: pre-wrap;
}
._2rhmJa pre, ._2rhmJa pre[class*=language-] {
word-wrap: normal;
word-break: break-all;
white-space: pre;
overflow-x: scroll;
overscroll-behavior-x: contain;
margin-top: 0px;
margin-bottom: 20px;
border-radius: 4px;
z-index: 0;
padding: 1em;
line-height: 1.5;
color: #ccc;
background: #2d2d2d;
}
code[class*=language-], pre[class*=language-] {
color: #ccc;
background: none;
font-family: Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*=language-] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
pre[class*=language-].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}
._2rhmJa :not(pre) code {
color: #c7254e;
background-color: #f2f2f2;
}
._2rhmJa pre[class*=language-] code, ._2rhmJa pre code {
padding: 0;
background-color: transparent;
color: inherit;
white-space: pre;
vertical-align: unset;
}
pre[class*=language-].line-numbers > code {
position: relative;
white-space: inherit;
}
.token.entity, .token.operator, .token.url {
color: #67cdcc;
}
.token.punctuation {
color: #ccc;
}
.token.atrule, .token.builtin, .token.important, .token.keyword, .token.selector {
color: #cc99cd;
}
.token.attr-value, .token.char, .token.regex, .token.string, .token.variable {
color: #7ec699;
}
.token.class-name, .token.constant, .token.property, .token.symbol {
color: #f8c555;
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0px;
font-size: 100%;
left: -3.8em;
width: 3em;
letter-spacing: -1px;
border-right: 1px solid #999;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.line-numbers-rows > span {
pointer-events: none;
display: block;
counter-increment: linenumber;
}
.anticon {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.12em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
svg:not(:root) {
overflow: hidden;
}
.anticon svg {
display: inline-block;
}
获取请求的HTTP方法
method = request.method
获取请求头
headers = request.headers
获取url
url = request.url
获取cookies
cookies = request.cookies
获取url GET参数
args = request.args
获取POST参数
args = request.get_data()
# 注:如果是form表单提交的POST数据请使用request.form
获取POST json参数
args = request.get_json()
注: get_json() 会自动将json数据转换为字符串,还有POST请求需要设置请求头发送参数为application/json格式,才可以接收到
如果没有设置成json格式发送,请使用get_data接收参数
获取form表单数据
form_name = request.form.get("name")
form_age = request.form.get("age")
# get里面的参数由input标签里面的name属性值决定
获取上传的文件
files = request.files.get("image")
#注:get里面的参数,由html form表单里面input的name属性值决定
flask获取参数的更多相关文章
- Flask request接口获取参数
Flask request接口获取参数 request.form.get("key", type=str, default=None) 获取表单数据, request.args ...
- python 全栈开发,Day120(路由系统, 实例化Flask的参数, 蓝图(BluePrint), before_request after_request)
昨日内容回顾 1.Flask: from flask import Flask app = Flask(__name__) # 从源码中可以看出,Flask集成的run方法是由werkzeug中的ru ...
- WebApi Post 后台无法获取参数的解决方案
事件回放: 之前一段时间,公司里前端用的Angularjs 发送http请求也是用的ng的组件,后台是.Net的WebApi 前端 var data = { PArgs: { PageIndex: 0 ...
- servlet获取参数时,request.getParameter("id")参数获取失败
servlet获取参数时,request.getParameter("id")参数获取失败,这里的参数是“index”里面href中的参数 要注意,取不到值,是不是要取的参数有没有 ...
- js 获取参数
<html lang="en"> <head> <meta charset="UTF-8"> <meta name=& ...
- nodejs Express 4.x req.body req.query req.params 三种获取参数的方法
第一种情况:http://localhost:3000/1,我们可以用req.params.(应该是跟路由有关,待) 第二种情况:http://localhost:3000/?id=1,用req.qu ...
- [py]os.walk爬目录&sys.argv灵活获取参数
1, 遍历目录 os.walk('/tmp') os.next() 2,sys.argv ######################################## py@lanny:~/t ...
- Servlet获取参数
package action; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.Servlet ...
- phalcon: 获取参数的方法
phalcon: 获取参数的方法 一般情况下:GET/POST $this->request->get(参数); $this->request->getPost("参 ...
随机推荐
- python学习第三天-元组、列表及字典
元组 # 元组() 关键字:tuple# 元组的值一旦确定,不可更改,包括增.删.改都不行# 1.元组只有一个数据时,加逗号在后面,不然就不是元组类型的数据tuple_1 = ("hello ...
- DNS解析全过程详解
1.Chrome浏览器 会首先搜索浏览器自身的DNS缓存(缓存时间比较短,大概只有1分钟,且只能容纳1000条缓存),看自身的缓存中是否有www.linux178.com 对应的条目,而且没有过期,如 ...
- python2和python3 中 input()方法的不同之处
python2在input()获取输入值时,所获取的值等于本身的数据类型 a = input("请输入:") print(a,type(a)) #如果输入的时int行数字,a 获取 ...
- C#break和continue学习
一,代码 static void Main(string[] args) { ; while (true) { int num = Convert.ToInt32(Console.ReadLine() ...
- Docker入门 .Net Core 使用Docker全程记录
https://www.cnblogs.com/flame7/p/9210986.html Docker入门 第一课 --.Net Core 使用Docker全程记录 微服务架构无疑是当前最火热的 ...
- React-Native基础-安卓篇(二)
前言:这一篇随笔将记录我在React-Native官网文档上学习的基础知识
- sleep - 延迟指定数量的时间
总览 (SYNOPSIS) sleep [OPTION]... NUMBER[SUFFIX] 描述 (DESCRIPTION) 暂停 NUMBER 秒. SUFFIX 如果 是 s, 指 暂停 的 秒 ...
- Docker基础(下)
Docker基础(下) 链接:https://pan.baidu.com/s/1u8Tg5qB4ZZHEK6GqCJkjwg 提取码:u8hb 复制这段内容后打开百度网盘手机App,操作更方便哦 5. ...
- python实现发送文本邮件
简单实现了python发送文本邮件 #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/4/25 17:09 # @Author ...
- 力扣—gray code (格雷编码) python实现
题目描述: 中文: 格雷编码是一个二进制数字系统,在该系统中,两个连续的数值仅有一个位数的差异. 给定一个代表编码总位数的非负整数 n,打印其格雷编码序列.格雷编码序列必须以 0 开头. 英文: Th ...