[Twisted-web] wmfactory not consistently executed
Dean Skuldt
twisted-web@twistedmatrix.com
Sat, 10 Jan 2004 08:47:42 -0800 (PST)
Hello,
I'm new to woven, but my understanding from the documentation is that the
appropriate model factories are executed for every request/response. By
watching the twistd.log for a print statement in my wmfactory, it seems that
the wmfactory method is not executed for every request/response. The
appearance (or lack thereof) of my printed statement in the log seems to be
unrelated to the frequency of requests.
## test.py
import os
from twisted.application import service, internet
from twisted.web.woven import page
from twisted.web import server
class MainPage(page.Page):
template = """
<html>
<body>
<div model="test"/>
</body>
</html>
"""
def wmfactory_test(self, request):
print "in test wmfactory"
return "hey"
site = server.Site(MainPage())
application = service.Application("test")
parent = service.IServiceCollection(application)
internet.TCPServer(8088, site).setServiceParent(parent)
##
Can anyone tell me if I'm doing something wrong or if my understanding of
wmfactories is incorrect?
Thanks,
Dean
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus