首页 > 如何在 Python 的模版中用 _ ?

如何在 Python 的模版中用 _ ?

现在使用 mako 模版引擎,在 html 代码中这样使用时 ${_('Francois Pinard')}, 提示

TypeError: 'Undefined' object is not callable

但这个例子可以:

http://docs.makotemplates.org/en/latest/usage.html#babel

如何在模版中使用 _ ?

【热门文章】
【热门文章】