callable(*object*)[](http://docs.jinkan.org/docs/jinja2/templates.html#callable "Permalink to this definition")
Return whether the object is callable (i.e., some kind of function). Note that classes are callable, as are instances with a __call__() method.
defined(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#defined "Permalink to this definition")
Return true if the variable is defined:
~~~
{% if variable is defined %}
value of variable: {{ variable }}
{% else %}
variable is not defined
{% endif %}
~~~
See the?[default()](http://docs.jinkan.org/docs/jinja2/templates.html#default "default")?filter for a simple way to set undefined variables.
divisibleby(*value*,?*num*)[](http://docs.jinkan.org/docs/jinja2/templates.html#divisibleby "Permalink to this definition")
Check if a variable is divisible by a number.
escaped(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#escaped "Permalink to this definition")
Check if the value is escaped.
even(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#even "Permalink to this definition")
Return true if the variable is even.
iterable(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#iterable "Permalink to this definition")
Check if it’s possible to iterate over an object.
lower(*value*)
Return true if the variable is lowercased.
mapping(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#mapping "Permalink to this definition")
Return true if the object is a mapping (dict etc.).
New in version 2.6.
none(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#none "Permalink to this definition")
Return true if the variable is none.
number(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#number "Permalink to this definition")
Return true if the variable is a number.
odd(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#odd "Permalink to this definition")
Return true if the variable is odd.
sameas(*value*,?*other*)[](http://docs.jinkan.org/docs/jinja2/templates.html#sameas "Permalink to this definition")
Check if an object points to the same memory address than another object:
~~~
{% if foo.attribute is sameas false %}
the foo attribute really is the `False` singleton
{% endif %}
~~~
sequence(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#sequence "Permalink to this definition")
Return true if the variable is a sequence. Sequences are variables that are iterable.
string(*value*)
Return true if the object is a string.
undefined(*value*)[](http://docs.jinkan.org/docs/jinja2/templates.html#undefined "Permalink to this definition")
Like?[defined()](http://docs.jinkan.org/docs/jinja2/templates.html#defined "defined")?but the other way round.
upper(*value*)
Return true if the variable is uppercased.
- 介紹
- 預備知識
- 安裝
- 基本 API 使用
- 實驗性的 Python 3 支持
- API
- 基礎
- Unicode
- 高層 API
- 自動轉義
- 標識符的說明
- 未定義類型
- 上下文
- 加載器
- 字節碼緩存
- 實用工具
- 異常
- 自定義過濾器
- 求值上下文
- 自定義測試
- 全局命名空間
- 低層 API
- 元 API
- 沙箱
- API
- 運算符攔截
- 模板設計者文檔
- 概要
- 變量
- 過濾器
- 測試
- 注釋
- 空白控制
- 轉義
- 行語句
- 模板繼承
- HTML 轉義
- 控制結構清單
- 導入上下文行為
- 表達式
- 內置過濾器清單
- 內置測試清單
- 全局函數清單
- 擴展
- 自動轉義擴展
- 擴展
- 添加擴展
- i18n 擴展
- 表達式語句
- 循環控制
- With 語句
- 自動轉義擴展
- 編寫擴展
- 集成
- Babel 集成
- Pylons
- TextMate
- Vim
- 從其它的模板引擎切換
- Jinja1
- Django
- Mako
- 提示和技巧
- Null-Master 退回
- 交替的行
- 高亮活動菜單項
- 訪問父級循環