31 May
2001
31 May
'01
11:25 p.m.
On Thu, 31 May 2001, Casey Duncan wrote:
DTML methods do this, DTML documents do not. Think "Containment before context" as a mantra. The only way to make a DTML Document act like it is contained in a different container would be to use an external method like so that rewrapped the document:
def rewrap(DTMLdoc, folder): """Returns a document in the context of another folder""" return DTMLdoc.aq_base.__of__(folder)
I am not sure I would recommend this approach, however, as it goes against the original DTML document design.
And it may also open a security hole by giving DTML programers the ability to wrap an object in a more permissive context, but I'm not sure, that just came to my mind. I wouldn't recommend it either. ;) -Michel