Hi Rich,

I am not aware of any method to stop a script from being directly 
called. You can however check this in the script itself.

You could try something like this (untested):
 > if context.REQUEST.get("PUBLISHED") == script:
 >     #raise an error here

This checks if the currently published object equals the current script.

Bart

On 11/18/11 19:05, Richard Harley wrote:
> Hello all
>
> I have a dtml method which builds a page from various different python
> scripts.
> How can I stop the python scripts from being called and passed variables
> independently of the main dtml method? I've tried some research on proxy
> roles but couldn't pin it down.  ZSQL methods are not callable
> independently and I would like Python Scripts to behave the same.
> TIA
> Rich
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> https://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>   https://mail.zope.org/mailman/listinfo/zope-announce
>   https://mail.zope.org/mailman/listinfo/zope-dev )
>
_______________________________________________
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to