updating (Cheetah) html in twisted webserver with Gadfly Database

T

Thomas

Hi,

i have a webserver with (approx.) the code below, but whatever i do
the html code sent to the browser stays the same.
The strangest is, if i insert a local variable in the class which is incremented
upon each call to self.render_GET() and append it to the html code, it
increments correctly on the browser. Could it be a probem with gadfly?


from twisted.web import resource, server

class webserv(resource.Resource):
isLeaf = True

def __init__(self):
#filling self.template with html code
#filling self._namespace with data for Cheetah

def update_namespace(self):
#call upon a gadfly- database and update the namespace

def render_GET(self, request):
return Template(self.template, searchList=[self._namespace]).__str__()


WebServer = webserv()
site = server.Site(WebServer)
reactor.listenTCP(80, site)

reactor.run()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top