python - 如何使用 KapellaTemplate 正确集成运行 Flask (app.py)
问题描述
我想知道如何使用flask app.py 来利用来自Kapella-Free-Bootstrap-Admin-Template 的免费模板。感谢您对此事的帮助。谢谢你。
app = flask.Flask(__name__)
@app.route("/")
def index():
return flask.render_template("index.html")
if __name__ == "__main__":
import os
port = 8000
# Open a web browser pointing at the app.
os.system("open http://localhost:{0}".format(port))
# Set up the development server on port 8000.
app.debug = True
app.run(host='0.0.0.0', port=port)
结构如下
app.py
templates
index.html
css
images
当我运行 app.py 时......页面出来但没有图像......不是很好的格式
感谢帮助。谢谢
解决方案
推荐阅读
- typo3 - Typo3:CKEditor - 我的 yaml 配置是否正确加载?
- javascript - 如何在 jspdf 中动态添加分页符,以防止表格跨越两页?
- c - 如果我们在 if 或 while 中首先使用 fork() 为什么会返回双零
- oracle - 从数据库中提取 rundeck 执行
- r - 在 pheatmap 中使用热图的特定值进行绘图
- angular - 如何从api获取音频作为响应
- android - 如何在 mediaRecorder 中设置正确的视频编解码器
- azureservicebus - 故障转移可能存在哪些服务总线异常?
- java - 在java中从excel中读取一行的多列?
- css - 编译的 css 因带有 & 符号的嵌套 mixin 而失败