I'm working on a project using Cheetah. I'd like to create a class like the following one:
from Cheetah.Template import Template
class TemplateObject(Template):
className = "Default ClassName"
def header(self):
return "My Class name is {}".format(type(self).className)
and then i'd like to be able in one of my template to do something like:
#extends TemplateObject
#staticarg className = "CustomClassName" ## Something to declare a static member ?
$self.header()
is it possible to do this ?
Thank you
You're looking for #attr.
Example: