“标记"的状态包括: Jinja中的关键字 [英] Status of the "marker" keyword in Jinja

查看:57
本文介绍了“标记"的状态包括: Jinja中的关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看 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中的关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆