Django Book 翻译
菜单>:
TOC
返回
原文:
Finally, you need to register the tag with your modules ``Library`` instance. Registering custom tags is very similar to registering custom filters (as explained above). Just instantiate a ``template.Library`` instance and call its ``tag()`` method. For example:
翻译:
最后,你需要用你的模块 ``Library`` 实例注册这个标签。注册自定义标签与注册自定义过滤器非常类似(如前文所述)。实例化一个 ``template.Library`` 实例然后调用它的 ``tag()`` 方法。例如:
备注:
译者: