【发布时间】:2019-05-06 03:59:07
【问题描述】:
我有 python 服务器,上面运行着烧瓶
from flask import Flask,render_template
app = Flask(__name__)
@app.route("/")
def main():
return render_template('index.html')
if __name__ == ("__main__"):
app.run(debug = True, host = "0.0.0.0", port =80)
这是 index.html 有简单的表单和发送按钮
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>whatl0ol</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
<div class="login">
<div class="heading">
<h2></h2>
<form action="#">
<div class="input-group input-group-lg">
<span class="input-group-addon"><i class="fa fa-user"></i></span>
<input type="text" class="form-control" placeholder="">
</div>
<button type="submit" class="float">check</button>
</form>
</div>
</div>
</body>
</html>
当用户从索引页面发送时,我需要解决方案,将其从 python 发送到 API。
还需要有关网站带宽的建议。
谢谢
【问题讨论】:
-
我不知道为什么我得到 - -es
-
你在使用任何框架吗?或者只是自定义 python 确保您对 web-server 可读的 css 文件夹具有正确的权限?
-
im 使用 python 烧瓶服务器路由到 /
-
使用 chmod -R 777