1 Star 0 Fork 0

敏哥/flask-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
4template.py 682 Bytes
一键复制 编辑 原始数据 按行查看 历史
敏哥 提交于 5个月前 . 模版
from flask import Flask,render_template
import time
app = Flask(__name__)
SERVER_PORT=9999
@app.route('/')
def index():
local_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(int(time.time())))
dictionary = dict(name='diyai1314',time=local_time,title='diyai1314')
rank = [1,2,3,4,5]
return render_template('index.html',
local_time=local_time,
dictionary=dictionary,
rank=rank,
get_server_port=get_server_port)
def get_server_port():
return SERVER_PORT
if __name__ == '__main__':
app.run(host='0.0.0.0', port=SERVER_PORT, debug=True)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/PatrickW/flask-web.git
git@gitee.com:PatrickW/flask-web.git
PatrickW
flask-web
flask-web
master

搜索帮助