[Twisted-Python] using defers with requests
Andrew Bennetts
andrew-twisted at puzzling.org
Sat Nov 15 20:11:46 MST 2003
On Sat, Nov 15, 2003 at 10:08:14PM -0500, Christopher Armstrong wrote:
> On Sat, Nov 15, 2003 at 06:57:38PM -0800, charles brandt wrote:
> > I am trying to select some data from a database in hopes of eventually using
> > it to populate a dynamic page. Before I dive into woven, I was trying to
> > get the following to print selected data directly to a html resource using
> > the following code snippet (or various versions of it). I've only been
> > able to get an empty page though ( <html><body></body></html> ). I'm
> > wondering if maybe the request is getting returned before the callback makes
> > it to the defer? Any ideas? Thanks in advance,
>
> Are you sure your code is even being triggered? Since your code isn't
> writing out those HTML tags anywhere, it seems like some completely
> different resource is being renderred instead of yours. Can you put
> some debug prints in "render" and "printResult"?
Also, Mozilla and IE I think both will say "<html><body></body></html>" even
when nothing was sent. Try testing with telnet or wget...
-Andrew.
More information about the Twisted-Python
mailing list