Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 configure.zcml 文件或类似文件为 Zope 注册外部方法?我正在尝试注册外部 Python 脚本(类似于其他注册表项,例如主题中的“jsregistry.xml”或“cssregistry.xml”)
不。外部方法是“老技术”,比 Zope 组件架构早几年。
您可以轻松添加按需创建 ExternalMethod 对象的 GenericSetup 导入步骤,但由于只有 Python 模块位于Extensions目录中(在 Products 和INSTANCE_HOME位置内,您也可以通过通常的 Python 文件访问方法枚举这些位置,添加所有内容您在那里找到并且根本不使用注册表。
Extensions
INSTANCE_HOME
但是,您确定要使用 ExternalMethod 吗?一个简单的实用程序或视图不是更容易吗?