You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I can do a PR if you want me to!
HTH.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: