python - 为什么plone.api没有find?

标签 python plone zope plone-4.x

我尝试创建一个脚本来查找现有文件夹,如果没有创建此文件夹。

但是当从 plone.api 调用 find 时,输出为 AttributeError: 'module' object has no attribute 'find'

在我的终端上咆哮:

$ bin/instance -O intranet debug
>>> from plone import api
>>> from zope.site.hooks import setSite
>>> portal = app['intranet']
>>> setSite(portal)
>>> folders = api.content.find(context=portal, portal_catalog='Folder')
Traceback (most recent call last):
File "<console>", line 1, in <module>
AttributeError: 'module' object has no attribute 'find'
>>>

我的情况有什么问题吗? 我使用了这个文档plone.api.content.find

最佳答案

需要将 plone.api 更新到支持方法查找的版本。正如@LucaFabbri 所说。就我而言,产品已更新至 1.5.0

关于python - 为什么plone.api没有find?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41828801/

相关文章:

python - 在 Mac 上安装适用于 python 的 WEKA

python - 在 Debian 上获得 Python 3 Mechanize 的最简单方法是什么?

python - Numpy 等同于没有循环的 if/else

wordpress - Plone 是否足以跟上其他 CMS 的步伐?

migration - Plone 4.3 和 Transmogrifier 安装

Python Pandas : Add a column to my dataframe that counts a variable

caching - plone.app.caching 仅用于首页

python - 大型门户网站上的 web2py 或 grok(zope),

plone - PloneTestCase、plone.testing 和 plone.app.testing 包有什么区别?

python - Cookie Cumbler 在 Zope 中如何工作?