[Zope-dev] ZPatterns sub-Specialist traversal
Michael R. Bernstein
webmaven@lvcm.com
Fri, 06 Apr 2001 06:46:17 -0700
Hello all,
I've been trying to follow the instructions for getting
subSpecialist instances to appear as directly traversable
from Specialist instances, but have not yet had any success.
Here is what I've done:
ArchiveImages (Specialist)
defaultRack
traversal_method (Python Script)
traversal (SkinScript)
Renderings (sub-Specialist)
defaultRack
traversal_method has 'REQUEST, name' as parameters, and the
following body:
return getattr(container.Renderings, name)
The 'traversal' SkinScript has the following body:
WITH SELF COMPUTE __bobo_traverse__=traversal_method
Nevertheless, when I try to traverse an instance in the
Specialist to an instance into the subspecialist, I get an
error:
http://localhost:8080/ArchiveImages/001/002
Resource not Found
Traceback (innermost last):
File
/usr/local/zope/2-3-1/lib/python/ZPublisher/Publish.py, line
223, in publish_module
File
/usr/local/zope/2-3-1/lib/python/ZPublisher/Publish.py, line
187, in publish
File /usr/local/zope/2-3-0/lib/python/Zope/__init__.py,
line 221, in zpublisher_exception_hook
(Object: 001)
File
/usr/local/zope/2-3-1/lib/python/ZPublisher/Publish.py, line
162, in publish
File
/usr/local/zope/2-3-1/lib/python/ZPublisher/BaseRequest.py,
line 372, in traverse
File
/usr/local/zope/2-3-1/lib/python/ZPublisher/HTTPResponse.py,
line 547, in notFoundError
NotFound: (see above)
The 002 sub-Specialist instance exists and is accessable
normally
(http://localhost:8080/ArchiveImages/Renderings/002), so I
must be doing something wrong in the PythonScript or the
SkinScript, but I don't know what.
Any help would be appreciated,
Michael Bernstein.