When using for example @mako_view("index"), the template engine will not pick up index.mako.
This happens because the BaseTemplate class has a hardcoded list of extensions that its specialisations don't modify accordingly to the extension that is commonly associated with them.
I'm currently working around that issue with the following:
bottle.BaseTemplate.extensions.append("mako")
I think a better way would be for the MakoTemplate, CheetahTemplate and Jinja2Template to pass to their parent class an additional extension upon instantiation. Consequently, the stpl extension should not be kept as a default extension in BaseTemplate, but passed by the SimpleTemplate class.
Hi,
When using for example
@mako_view("index")
, the template engine will not pick upindex.mako
.This happens because the
BaseTemplate
class has a hardcoded list of extensions that its specialisations don't modify accordingly to the extension that is commonly associated with them.I'm currently working around that issue with the following:
I think a better way would be for the
MakoTemplate
,CheetahTemplate
andJinja2Template
to pass to their parent class an additional extension upon instantiation. Consequently, thestpl
extension should not be kept as a default extension inBaseTemplate
, but passed by theSimpleTemplate
class.I can do a PR if you want me to!
HTH.