[Twisted-web] Using Cheetah with twisted.web
Matt Helm
code.name.eric at gmail.com
Tue Feb 14 09:41:24 MST 2006
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
More information about the Twisted-web
mailing list