[Zope] DTML namespace problem (was: dtml-tree issue)
Andreas Jung
lists at andreas-jung.com
Mon Apr 11 06:50:40 EDT 2005
--On Montag, 11. April 2005 13:44 Uhr +0300 Vangelis Mihalopoulos
<mihalop at vtrip.net> wrote:
>
> Hello,
>
> i have focused my problem on this:
>
> having a Python Script "testScript":
> ------------------------------------
> class obj:
> a = 1
> b = 2
> c = 3
>
> return obj()
> ------------------------------------
>
> and a DTML Document "testWith":
> -------------------------------
> <dtml-with testScript>
> <dtml-var a>
> </dtml-with>
> -------------------------------
>
> when i try to view the DTML Document, i get an "Unauthorized"
> Exception.....
> I believe this has something to do with the security mechanism of Zope.
> What must i return from the Python Script in order for the DTML Document
> to work?
>
You should *not* define classes inside PythonScripts. PythonScripts are
stricted
and don't provide the full functionality. Either use filesystem based code
(Zope
Product) or use simple Python datatypes as dictionaries in this case.
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050411/0333fd77/attachment.bin
More information about the Zope
mailing list