[Zope] Calling ZSQLMethods in parents' folder from PythonScripts
tom smith
tom@othermedia.com
Fri, 28 Sep 2001 11:53:08 +0100
Hello
I have a folder structure like this...
Folder: MyProject
ZSQLMethod: create_category_sql
Folder: Whatever
PythonScript: create_category
DTMLMethod: create_category_form
The create category form is like this...
<form action="create_category" method="post"> etc
And the create_category PythonScript tries to do this...
context.create_category_sql(context.REQUEST)
... But I get a "Not Found" error when I submit the form...
<!--
Traceback (innermost last):
File G:\zope2.3\lib\python\ZPublisher\Publish.py, line 223, in
publish_module
File G:\zope2.3\lib\python\ZPublisher\Publish.py, line 187, in publish
File G:\zope2.3\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
File G:\zope2.3\lib\python\ZPublisher\Publish.py, line 173, in publish
File G:\zope2.3\lib\python\ZPublisher\HTTPResponse.py, line 308, in
setBody
File G:\zope2.3\lib\python\ZPublisher\HTTPResponse.py, line 547, in
notFoundError
NotFound: (see above)
-->
I thought that using context. Would let the script use acquisition to back
it's way up my folder hierarchy and use the ZSQL Method. Or have I got this
wrong?
Cheers
Tom
P.s please cc me if you reply, ta!
--
tom smith | tom@othermedia.com | http://www.othermedia.com/blog
0207 089 5959 | Floor 3, The Pavilion, Newhams Lane, London SE1 3UZ