[ZPT] ZPT calling private Method

Geoffroy Charollais geoffroy at charollais.org
Mon Jun 12 09:04:41 EDT 2006


Hello everybody,

I'm a newbee in Zope and I'm facing a problem:

I'm writting a Zope Product in order to produce a
Web Site in which there is a private part. In this part
I have an object which contain a protected method
calling a pagetemplate.

myProtectedMethod =  PageTemplateFile('zpt/Myzpt.zpt', globals(), 
__name__='MyZpt')

I would like this pagetemplate to
call a method from an another object,

<div tal:define="mytest python:context.MySecondObject.aMethod(AnArgument)">


but in the same time
I would like this second object to be declared as private (to be sure
that it is not callable by URL).

In this case when I'm calling the protected method , I always have the 
same error message:

*Error Type: Unauthorized*
*Error Value: You are not allowed to access 'MySecondObject' in this 
context*

Is there any way to have this working?


Thanks to any help that could be give to me

and I also apologize for my so bad english  :-)

jolelion


More information about the ZPT mailing list