本文整理汇总了Python中OFS.Folder.Folder.manage_delObjects方法的典型用法代码示例。如果您正苦于以下问题:Python Folder.manage_delObjects方法的具体用法?Python Folder.manage_delObjects怎么用?Python Folder.manage_delObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OFS.Folder.Folder
的用法示例。
在下文中一共展示了Folder.manage_delObjects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cancelCheckout
# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import manage_delObjects [as 别名]
def cancelCheckout(self):
baseline = self._getBaseline()
notify(event.CancelCheckoutEvent(self.context, baseline))
wc_container = aq_parent(aq_inner(self.context))
Folder.manage_delObjects(wc_container, [self.context.getId()])
if getSecurityManager().checkPermission(permissions.View, baseline):
return baseline
else:
return aq_parent(baseline)
示例2: manage_delObjects
# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import manage_delObjects [as 别名]
def manage_delObjects(self, ids=[], REQUEST=None):
""" override default method to handle better the redirection """
for activity_id in [id for id in ids if id in self.objectIds('Activity')]:
# fallout all the workitems that have this activity id
for wi in self.Catalog(meta_type='Workitem',
process_path=self.absolute_url(1),
activity_id=activity_id,
status=['active', 'inactive']):
wi_obj = self.Catalog.getobject(wi.data_record_id_)
wi_obj.aq_parent.falloutWorkitem(wi.id)
Folder.manage_delObjects(self, ids)
if REQUEST: REQUEST.RESPONSE.redirect(REQUEST.HTTP_REFERER)
示例3: manage_delObjects
# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import manage_delObjects [as 别名]
def manage_delObjects(self, ids=[], REQUEST=None):
""" override default method to handle better the redirection """
Folder.manage_delObjects(self, ids)
if REQUEST: REQUEST.RESPONSE.redirect(REQUEST.HTTP_REFERER)