[Twisted-web] livepage and IClientHandle().transient

Alessandro aleuser at inwind.it
Fri Jun 23 19:04:21 CDT 2006

  I'm in trouble with livepage. Looking at livepage.LivePage.__doc__ I 
can see this example:
 def render_clickable(self, ctx, data):
             def hello(ctx):
                 return livepage.alert("Hello, world. You can only click 
me once.")
             return ctx.tag(onclick=IClientHandle(ctx).transient(hello))

I have tested it, but I can't find IClientHandle inside the "normal" 
page context; I can find it only inside the handle_XX's context, but I 
can't use "transient" (It doesn't function, I can click as many times as 
I want).

How can I "grant the client the capability of calling a handler once and 
exactly once"?

I'm going to use the server side sessions and something similar "return 
client.get(btn_idname).disable=true"... but I don't like it.


More information about the Twisted-web mailing list