You are not logged in Log in Join
You are here: Home » Collectors » NEW Zope.org (the website) » Zope Book 2.6 - Tal - python modules example doesn't work » collector_issue_contents

Log in
Name

Password

 
 
Issue 333 of NEW Zope.org (the website) [ZOC]
Title: Zope Book 2.6 - Tal - python modules example doesn't work
Status: Pending Security related: No
Description: Hi, the following example: tal:define="global pps modules/Products/PythonScripts/standard" Taken from: http://zope.org/Documentation/Books/ZopeBook/...
From: jmeile on: May 3, 04 15:18
jmeile Last update: May 3, 04 15:18
Topic/class: content/bug Importance: medium
Version info: 2.7.0
Uploads:
File FooProduct.tar.gz Hi, the following example: tal:define="globa...
Issue 333 Transcript
1 entry
= Request - Entry #1 by jmeile on May 3, 2004 3:18 pm


Uploaded: FooProduct.tar.gz

Hi,

the following example:
tal:define="global pps modules/Products/PythonScripts/standard"

Taken from:
http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx

doesn't work if you replace it with your own module. You will get an Unauthorized Error even if you define the correct module assertions. ie:
tal:define="FooPackage modules/Products/FooContainer/FooPackage"

the python version:
tal:define="FooPackage python:modules['Products.FooProduct.FooPackage']

will work. If you try this other sintax, which was proposed by Dieter, it will work as well:
tal:define="FooPackage modules/Products.FooProduct"

Attached to this report is a small test case.

Regards,
Josef