Feb. 14, 2006
4:41 p.m.
Hello all, I have just recently started working with twisted.web and think is great. I would like to use Cheetah templates with it - should I be doing something more complicated than the following? ################# # alf.rpy from twisted.web import resource from Cheetah.Template import Template f = "foo" b = ["bar", "baz"] class Resource(resource.Resource): def render(self, request): return Template(file="alf.tmpl", searchList = [{'f': f, 'b': b}]).__str__() resource = Resource() ################# Thanks, Matt