[Zope] ZPT and private method
Dragos Chirila
d.chirila at finsiel.ro
Tue Feb 10 09:56:25 EST 2004
Hi Andreas
Until now, I used DTMLFile for the index_html of the object. Calling private
methods from object's index_html was not a problem.
Now I want to migrate to ZPT but I got into this: can't call the same
private methods from the ZPT index_html.
Only because I want to use ZPT for presentation means I have to make some
changes in the Python code.
Is there another way to handle this? Any ideas will be appreciated.
Thanks,
Dragos
----- Original Message -----
From: "Andreas Jung" <andreas at andreas-jung.com>
To: "Dragos Chirila" <d.chirila at finsiel.ro>; <zope at zope.org>
Sent: Tuesday, February 10, 2004 4:41 PM
Subject: Re: [Zope] ZPT and private method
> Hi,
>
> why do you think that the method is called "private"? Please check the
> Zope Developers Guide to find out about ClassSecurity. Any TTW code
> is restricted, so any private method can never be called by TTW code.
>
> -aj
>
> --On Dienstag, 10. Februar 2004 16:35 Uhr +0200 Dragos Chirila
> <d.chirila at finsiel.ro> wrote:
>
> > Hi
> >
> > I have a Python product, the main class is derived from SimpleItem. I
want
> > to call an object private method, 'getSomething', from ZPT index_html of
> > the object. I got an error like :
> >
> > Error Type: Undefined
> > Error Value: You are not allowed to access getSomething in this context
> > not found in 'here/getSomething', at line 14, column 9
> >
> > The method getSomething is declared private.
> >
> > What am I doing wrong here? I cannot call a private method from a ZPT of
> > the same object? Is there a way to handle this?
> >
> > Thanks a lot,
> > Dragos
> >
> >
> >
> > _______________________________________________
> > Zope maillist - Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists -
> > http://mail.zope.org/mailman/listinfo/zope-announce
> > http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
>
>
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
More information about the Zope
mailing list