[Twisted-web] Making a Page instance a proxy to another one

Michal Pasternak michal at pasternak.w.lub.pl
Mon Jun 21 05:12:54 MDT 2004

Michal Pasternak [Mon, Jun 21, 2004 at 05:20:39AM +0200]:
> 	def child_(self, req):
> 		return self.getDynamicChild("", req)
> 	def getDynamicChild(self, name, req):
> 		if name="":
> 			return self.proxyPage
> 		else:
> 			return maybeDeferred(self.proxyPage.locateChild, [name], req).addCallback(lambda x: x[0])
> ... basically, this works okay for child_* methods in proxyPage, but gives
> wrong results for formless child mixins (I haven't tested
> proxyPage.getDynamicChild).

Well, that behaviour was caused by broken locateChild, fixed in rev. 346.
Anyway, even if that works, I still look forward for any better methods :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://pyramid.twistedmatrix.com/pipermail/twisted-web/attachments/20040621/5c94fc0c/attachment.bin

More information about the Twisted-web mailing list