python - How can I extend a tornado template from a parent template by giving a path starting from template_path? -
I have set the template_path configuration variable in my template from the template folder.
I have the following template in this folder: I want Base.html so I have: This causes the following error: Obviously this is looking at the same directory with a child template. Of course I can get base.html from Can anyone help? The way < The template will start looking for a template from edit : I Confirmed that it is no longer possible and it has been added by Ben Durnell as Tornado Issues Tracker (he maintains Tornado Project). to expand
register.html
base.html admin / register.html
expand {% "base.html"%}
IOError: [Aron 2] There is no such file or directory: '/ home / kj / lab / test / templates / Admin / base.html '
../bas.html but I think it is better if I can give it the "full path" (in the sense of starting with template_path)
render works, I do not think it is possible is. When you give the name of the template to render the function, such as:
RequestHandler.render ('admin / register.html')
template_path / admin> to
extended which is a
operator , code
Find the template in the admin directory, so you have to give relative path if I get something else, then I will update this answer
Comments
Post a Comment