问题描述
我正在查看 Jinja的模板文档,并注意到该示例未使用基本模板中的marker
关键字,以后在文档中也不会使用.但是,如果您此处,则在示例中将marker
与.
I was looking though the templating documentation for Jinja and noticed that the example does not use the marker
keyword in the base template, nor is it used later on in the documentation. However if you look here, marker
is used in the example with block
.
那是为什么?不推荐使用marker
吗?一个文档比另一个文档更新吗?
Why is that? Is marker
deprecated? Is one doc more up to date than the other?
推荐答案
这些是有关Jinja的两个截然不同版本的文档. http://jinja.pocoo.org/docs/记录了当前版本Jinja2,而 http://wsgiarea.pocoo.org/jinja/记录了一个旧jinja"pre 1.0"版本,大概是出于历史目的. marker
可能已在Jinja2中删除,因为它等效于一个空的block
标记.
Those are documentation for two very different versions of Jinja. http://jinja.pocoo.org/docs/ documents the current version, Jinja2, while http://wsgiarea.pocoo.org/jinja/ documents an old jinja "pre 1.0" version, for historical purposes presumably. marker
was probably removed in Jinja2 because it is equivalent to an empty block
tag.
这篇关于“标记"的状态包括: Jinja中的关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!