Re: How do I import packages/modules from Products?
Hi Chris,
Thanks for your response.
In itself, your idea is a good one. However to subclass ZCatalog I still have to import ZCatalog from Products, which is not in the path. Perhaps you could try to publish ZCatalog as a module. Here is a how-to:
http://www.zope.org/Members/Amos/ZPublisher Regards, Josef
Josef Meile wrote:
In itself, your idea is a good one. However to subclass ZCatalog I still have to import ZCatalog from Products, which is not in the path.
This should work... or you have a really broken Zope-Installation...;) from OFS.Folder import Folder from Products.ZCatalog.ZCatalog import ZCatalog class CatalogFolder(Folder, ZCatalog): manage_options = Folder.manage_options + ZCatalog.manage_options -mj
Hi Maik, It would seem I don't have a broken Zope instalation but a broken brain. I wasn't qualifying the ZCatalog package with Products. As you have shown: from Products.ZCatalog.ZCatalog import ZCatalog Thanks Sean Kemplay --- Maik Jablonski <maik.jablonski@uni-bielefeld.de> wrote:
Josef Meile wrote:
In itself, your idea is a good one. However to subclass ZCatalog I still have to import ZCatalog from Products, which is not in the path.
This should work... or you have a really broken Zope-Installation...;)
from OFS.Folder import Folder from Products.ZCatalog.ZCatalog import ZCatalog
class CatalogFolder(Folder, ZCatalog):
manage_options = Folder.manage_options + ZCatalog.manage_options
-mj
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
__________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com
participants (3)
-
Josef Meile -
Maik Jablonski -
Sean K