[Twisted-web] Freeform/formless doesn't work with deferred properties?
Gavrie Philipson
twisted-web@twistedmatrix.com
Tue, 23 Dec 2003 08:21:47 +0200
Christopher Armstrong wrote:
...
> I don't know what to do about your freeform/deferred problem, but this
> one's easy to handle: don't return tags that have Deferreds inside, do
> this:
>
> def render_foo(self, ctx, data):
> d = getYourDeferred()
> d.addCallback(self._cbGenTags, ctx)
> return d
>
> def _cbGenTags(self, result, ctx):
> return ctx.tag[ str(result) ]
Christopher,
This indeed solved the problem.
Thanks,
-- Gavrie.