>  Q&A  >  본문

python - render_tempalte 不能加载目录下文件

from __init__ import static
from flask import render_template,url_for

@static.route('/')
def test():
    return render_template("static/test_page.html")

只有在__init__的蓝图中设置template_folder才能勉强读取到html 但是js css就怎么也读取不到 url_for也试过了

PHP中文网PHP中文网2741일 전474

모든 응답(0)나는 대답할 것이다

답장 없음
  • 취소회신하다