[Zope] Module security assertions fail

Matt Hamilton matth at netsight.co.uk
Sun May 2 07:12:36 EDT 2004

Josef Albert Meile wrote:

> Thanks for your reply. Finally I got working. I did everything what you 
> said, but it didn't work either. So, I just replace:
> <span tal:define="TranslationUtils 
> modules/Products/JMUtils/TranslationUtils;">
> Something comes here
> </span>
> by its python equivalent:
> <span tal:define="TranslationUtils 
> python:modules['Products.JMUtils.TranslationUtils'];">
> Something comes here
> </span>
> and guess what, it worked. I find this behaviour wird because according 
> to the Zope book both statements should do the same. I will try to do a 

   I think the first case (TALES syntax) actually tries to *call* the 
modules TranslationUtils, whereas the latter (python syntax) doesn't -- 
it just references it.  I think if you add a 'nocall' statement to the 
first case it will do what you want e.g.:

<span tal:define="TranslationUtils
  Something comes here


Matt Hamilton                                       matth at netsight.co.uk
Netsight Internet Solutions, Ltd.        Business Vision on the Internet
http://www.netsight.co.uk                             +44 (0)117 9090901
Web Design | Zope/Plone Development & Consulting | Co-location | Hosting

More information about the Zope mailing list