[Zope] Zclasses derived from ZCatalog
Tres Seaver
tseaver@palladion.com
Wed, 03 Nov 1999 10:27:27 -0600
Martijn Pieters wrote:
>
> I hate it when I slip on the keyboard and sent a completely unedited email
> out..
>
> At 16:31 03/11/99 , Tres Seaver wrote:
> >Hmm, I can't seem to make that work:
> >
> > ZClass Foo( ObjectManager, ZCatalog )
> > \
> > ZClass Bar( CatalogAware, ObjectManager )
> > \
> > ZClass Baz( CatalogAware )
> >
> >I can add Bars and Bazzes within a Foo, and they show up in its
> >manage_catalogView. I tried defining a DTML method using your syntax in
> >either
> >Foo or Bar to (say) list all the Bazzes, like so:
> >
> > <dtml-var standard_html_header>
> >
> > <UL>
> > <dtml-in "_['Catalog'](meta_type='Baz')">
> > <LI> <dtml-var id>
> > </dtml-in>
> > </UL>
> >
> > <dtml-var standard_html_footer>
> >
> >But I can't execute it -- I get "You are not authorized to access
> >Catalog". If
> >I tweak the permission map a bit for Foo (Access Content Information->Access
> >Content Information), I then get "You are not authorized to access this".
> >
> >So, I give the Catalog method a "Manager" proxy. Now, I get:
> >
> > Error Type: AttributeError
> > Error Value: __getitem__
>
> Erm... bother. And the traceback is?
DOH! My bad!
<!--
Traceback (innermost last):
File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 179, in publish
File /usr/local/Zope/lib/python/Zope/__init__.py, line 201, in
zpublisher_exception_hook
(Object: CatalogAware)
File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 165, in publish
File /usr/local/Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: list_bazzes)
File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 102, in
call_object
(Object: list_bazzes)
File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 145, in __call__
(Object: list_bazzes)
File /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 502, in
__call__
(Object: list_bazzes)
File /usr/local/Zope/lib/python/DocumentTemplate/DT_In.py, line 672, in
renderwob
(Object: _['Catalog'](meta_type='Baz'))
AttributeError: (see above)
-->
--
=========================================================
Tres Seaver tseaver@palladion.com 713-523-6582
Palladion Software http://www.palladion.com