チーターで静的メソッドを宣言する方法はありますか?IE
snippets.tmpl
#def address($address, $title)
<div class="address">
<b>$title</h1></b>
#if $address.title
$address.title <br/>
#end if
$address.line1 <br/>
#if $address.line2
$address.line2 <br/>
#end if
$address.town, $address.state $address.zipcode
</div>
#end def
....
other snippets
other.tmpl
#from snippets import *
$snippets.address($home_address, "home address")
このコードはこのエラーを報告します:NotFound: cannot find 'address'。チーターはそれをバインドされたメソッドとしてコンパイルしています。
snippets.py
class snippets(Template):
...
def address(self, address, title, **KWS):
静的メソッドを宣言する方法はありますか?そうでない場合、このようなもの(スニペットライブラリ)を実装するためのいくつかの代替方法は何ですか?