Using Cheetah with twisted.web
14 Feb
2006
14 Feb
'06
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
6611
Age (days ago)
6617
Last active (days ago)
11 comments
7 participants
participants (7)
-
Amit Upadhyay
-
C Wegrzyn
-
Chaz.
-
David E. Konerding
-
L. Daniel Burr
-
Matt Helm
-
Todd Thomas