[Zope] Instance from my Zclass have permission problem
Terry
terry@taipeitimes.com
Tue, 19 Mar 2002 09:21:35 +0800
Hello, everyone
I made a wrong explanation at my last mail.
So let me explain again ?
I create a product form Web management interface, and have a Python script to call ZSQL Method
in the methods folder.Two ZSQL Methods are exactly the same, only have different id
My Python Script
## Script (Python) "update_to_db"
##bind container=container
##bind context=context
##bind namespace=_
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
print script.sql_Up # or I change to print script.sql_Update
return printed
#MY ZSQL Method sql_Update
UPDATE tt_hold_ar SET
ar_head='Permission' WHERE
ar_id='0000114415'
#ZSQL Method sql_Up
UPDATE tt_hold_ar SET
ar_head='Permission' WHERE
ar_id='0000114415'
I print two same ZSQL Method out, one is <SQL instance at 8b7f2b0>, another is
<!--
Traceback (innermost last):
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 150, in publish_module
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 114, in publish
File /usr/lib/zope/lib/python/Zope/__init__.py, line 158, in zpublisher_exception_hook
(Object: 0000114424)
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 98, in publish
File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply
(Object: update_to_db)
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object
(Object: update_to_db)
File /usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 252, in __call__
(Object: update_to_db)
File /usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 283, in _bindAndExec
(Object: update_to_db)
File /usr/lib/zope/lib/python/Products/PythonScripts/PythonScript.py, line 291, in _exec
(Object: update_to_db)
(Info: ({'script': <PythonScript instance at 8bad1c0>, 'context': <TTNews instance at 8d86ae0>, 'container': <TTNews instance at 8d86ae0>, '_': <TemplateDict object at 0x88f5c98>, 'traverse_subpath': []}, (), {}, None))
File Script (Python), line 15, in update_to_db
AttributeError: (see above)
-->
Could anybody know why?
Thanks a lot,
< instance="" at="" 8cd88a0="">
Terry