Django Book 翻译
菜单>:
TOC
返回
原文:
To be a valid tag library, the module must contain a module-level variable named ``register`` that is a ``template.Library`` instance. This ``template.Library`` instance is the data structure in which all the tags and filters are registered. So, near the top of your module, insert the following:
翻译:
要成为有效的标签库,模块必须包含一个模块级的变量: ``register`` ,这是一个 ``template.Library`` 的实例。这个 ``template.Library`` 实例是包含所有已注册的标签及过滤器的数据结构。因此,在模块的顶部位置插入下述代码:
备注:
译者: