1
我用的xmlrpclib,wsapi4plone连接到Plone的:如何通过Plone中的完整路径检查文件夹是否存在?
client = xmlrpclib.ServerProxy('http://user:[email protected]/plone')
有没有检查是否通过URL存在于Plone的一个文件夹的方法?是这样的:client.exists('/sites/ng/path/to/folder')
我所做的是有点欺骗的:
try:
client.get_types('/sites/ng/path/to/folder')
except:
#if there's an exception, that means there's no folder -> create it here
client.post_object(folder)
我没有管理员权限,所以我不能看的方法列表(有人告诉我,这是在Plone站点的某处但我需要成为管理员)。我不想在这里问一下关于什么方法可用的问题,网络上的任何地方是否有plone的方法列表?
我喜欢第一个解决方案。然而,当我尝试它,我得到这个错误:TypeError:__call __()有一个意想不到的关键字参数'路径'。或者,如果我删除关键字,我得到这个错误:'xmlrpclib.Fault:<故障-1:“意外的Zope异常: - 字符串索引必须是整数,而不是str”>' –
BPm