Skip to content

Commit 069b42f

Browse files
committed
添加测试文件
1 parent af9cda0 commit 069b42f

File tree

6 files changed

+46
-0
lines changed

6 files changed

+46
-0
lines changed

site/apt.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sudo apt-add-repository ppa:mc3man/older
2+
3+
sudo apt update && sudo apt install gedit gedit-plugins gedit-common

site/form.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>表单提交、支持jQuery提交格式</title>
6+
</head>
7+
<body>
8+
<h1>表单提交</h1>
9+
<form action="./form" method="post">
10+
<div><input type="text" name="name"></div>
11+
<br>
12+
<div><input type="text" name="name"></div>
13+
<br>
14+
<div><input type="submit" value="提交" /></div>
15+
</form>
16+
</body>
17+
</html>

site/form.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def handler(self):
2+
print self.form
3+
return 'ok'

site/index.html.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def handler(self):
2+
return 'ok'

site/upload.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>文件上传例子</title>
6+
</head>
7+
<body>
8+
<h1>上传文件</h1>
9+
<form action="./upload" method="post" enctype="multipart/form-data">
10+
<div><input type="file" name="file" /></div>
11+
<br>
12+
<div><input type="file" name="file1" /></div>
13+
<br>
14+
<div><input type="submit" value="开始上传" /></div>
15+
</form>
16+
</body>
17+
</html>

site/upload.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
def handler(self):
2+
files = self.files
3+
print files
4+
return 'ok'

0 commit comments

Comments
 (0)