Is there a way to declare static methods in cheetah? 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")
This code reports this error: NotFound: cannot find 'address'
. Cheetah is compiling it as a bound method, natch:
snippets.py
class snippets(Template):
...
def address(self, address, title, **KWS):
Is there a way to declare static methods? If not, what are some alternative ways to implement something like this (a snippets library)?