How to change the mako substitution delimiter characters?

守給你的承諾、 提交于 2019-12-06 08:29:54

问题


Is it possible to change the "delimiter tags" for expression substitution in the Python Mako templating library? If so, how?

e.g.: Instead of <div>${foobar}</div>, I would like to use the syntax <div>{{foobar}}</div>.

I can't seem to find any references in the Mako docs.


回答1:


As of March 6, 2015, it's not currently possible.

See the feature request to add configurable delimiters for Mako.



来源:https://stackoverflow.com/questions/28890953/how-to-change-the-mako-substitution-delimiter-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!