我们正在尝试添加z sql方法来访问数据库。我们已经做了这个并测试了它。但是,在遵循有关如何在脚本(Setting a variable for a Z SQL method和http://docs.zope.org/zope2/zope2book/RelationalDatabases.html)中访问该方法的说明时,脚本在实例日志中失败并显示此错误:
AttributeError:MethodName
这是在调用:context.MethodName
时该功能适用于自定义的'portal_skins / plone_scripts'
使用:Plone 4.2.6
任何人都有线索?
2014-01-24T12:48:16 ERROR Zope.SiteErrorLog 1390585696.260.938992561119 http://foo.com/mail_password
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module Shared.DC.Scripts.Bindings, line 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 344, in _exec
Module script, line 5, in mail_password
- <CustomizedPythonScript at /mail_password>
- Line 5
Module AccessControl.ImplPython, line 675, in guarded_getattr
AttributeError: InsertMessage
调用insert消息:'portal_skins / plone_scripts / mail_password'脚本中的context.InsertMessage(变量)