Re: [Zope] How to use ZPT with ad-hoc context?

2009-05-04 Thread Daniel Dekany
Monday, May 4, 2009, 9:18:52 PM, Hedley Roos wrote: >>> __allow_access_to_unprotected_subobjects__ = 1 >> >> That indeed works, thanks! >> >>> You probably should not use that line too often :) >> >> I would prefer doing it correctly/safely, but is there a way? Because >> it even exposes the unpro

Re: [Zope] How to use ZPT with ad-hoc context?

2009-05-04 Thread Hedley Roos
>> __allow_access_to_unprotected_subobjects__ = 1 > > That indeed works, thanks! > >> You probably should not use that line too often :) > > I would prefer doing it correctly/safely, but is there a way? Because > it even exposes the unprotected subobjects of the acquired objects... > sounds a bit s

Re: [Zope] How to use ZPT with ad-hoc context?

2009-05-04 Thread Daniel Dekany
Monday, May 4, 2009, 11:59:21 AM, Hedley Roos wrote: > Daniel Dekany wrote: >> How to create a template context ("here" inside ZPT) that is not an >> object from the ZODB, just a temporary object? This is what I tried: >> >> class AdhocContext(Implicit): >> pt = PageTemplateFile("whateve

Re: [Zope] How to use ZPT with ad-hoc context?

2009-05-04 Thread Hedley Roos
Daniel Dekany wrote: > How to create a template context ("here" inside ZPT) that is not an > object from the ZODB, just a temporary object? This is what I tried: > > class AdhocContext(Implicit): > pt = PageTemplateFile("whatever/path", globals()) > ... > > MyZopeProduct: > > d

[Zope] How to use ZPT with ad-hoc context?

2009-05-04 Thread Daniel Dekany
How to create a template context ("here" inside ZPT) that is not an object from the ZODB, just a temporary object? This is what I tried: class AdhocContext(Implicit): pt = PageTemplateFile("whatever/path", globals()) ... MyZopeProduct: def whatever(self): "Test" ctx =