[Twisted-web] Freeform/formless doesn't work with deferred properties?

Donovan Preston twisted-web@twistedmatrix.com
Tue, 23 Dec 2003 10:33:13 -0500


On Dec 22, 2003, at 10:38 AM, Gavrie Philipson wrote:

> Hi,
>
> I'm using freeform/formless to handle a form.
> However, when the property returns a deferred value, it is not handled 
> correctly by freeform.
> Is this a bug?
>
> Attached is an example (based on DP's examples) that shows the 
> behavior: When rendering the page, instead of seeing "50" in the input 
> field, it shows something like '<Deferred at 0xbec7c30c>'.
>
> PS: A similar thing happens when returning a deferred as an attribute 
> of context.tag in a render method.

Your suspicions about the freeform problem being related to the 
attribute problem are correct; apparently nevow doesn't deal with 
deferreds in attribute values properly. Are you sure you are using CVS 
HEAD? I checked in some changes fairly recently which may affect the 
situation.

Anyway, it's something that should certainly be fixed. In the meantime, 
it's good that you have a workaround.

dp