这章主要将一些jinja2的页面模板,个人觉得这种轮子或者黑盒的使用不必太过仔细,必要的时候再记就行了。
3.4 链接
这种引入了url_rof()函数,其作用是传入视图函数的名字,以及一些参数,生产对应的url链接
1、例如 url_rof (‘index’, _external = True) –> http://localhost:5000/
2、有些链接是动态链接,url_for (‘user’, name= ‘Wa’, _external = True) - > xxxx/user/Wa
3、还能将任何参数添加到字符串 url_rof (‘index’,page=2,) –> http://localhost:5000/?page=2
3.5静态文件
引用一些本地文件。