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()
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()