python - render_tempalte 不能加载目录下文件
PHP中文网
PHP中文网 2017-04-18 10:25:39
0
0
467
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中文网

认证0级讲师

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!