Ten: jinja2 template search path

 

 

jinja2 for rendering templates

 

Search Path

1, find the default templates specified below from the project under the root directory of html files

 

It can also create a new path down

 

2, specify a custom path

In Flask source, specify the default path for the templates

 

Parameter can be used to specify a custom path template_folder

 

Guess you like

Origin www.cnblogs.com/zhongyehai/p/11780227.html