当前位置: 首页>>代码示例>>Python>>正文


Python ATFolder.manage_afterAdd方法代码示例

本文整理汇总了Python中Products.ATContentTypes.content.folder.ATFolder.manage_afterAdd方法的典型用法代码示例。如果您正苦于以下问题:Python ATFolder.manage_afterAdd方法的具体用法?Python ATFolder.manage_afterAdd怎么用?Python ATFolder.manage_afterAdd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Products.ATContentTypes.content.folder.ATFolder的用法示例。


在下文中一共展示了ATFolder.manage_afterAdd方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: manage_afterAdd

# 需要导入模块: from Products.ATContentTypes.content.folder import ATFolder [as 别名]
# 或者: from Products.ATContentTypes.content.folder.ATFolder import manage_afterAdd [as 别名]
    def manage_afterAdd(self, item, container):
        # XXX TODO: when we're done with 2.1.x, implement this via event subscription

        ATFolder.manage_afterAdd(self, item, container)

        id = self.getId()        
        if self.fsStartField.__name__ != id:
            self.fsStartField.__name__ = id
开发者ID:dtgit,项目名称:dtedu,代码行数:10,代码来源:fieldset.py

示例2: manage_afterAdd

# 需要导入模块: from Products.ATContentTypes.content.folder import ATFolder [as 别名]
# 或者: from Products.ATContentTypes.content.folder.ATFolder import manage_afterAdd [as 别名]
    def manage_afterAdd(self, *args, **kwargs):
        """
        """
        #log("manage_afterAdd: %s" % self)

        #retVal = OrderedBaseFolder.manage_afterAdd(self, *args, **kwargs)
        retVal = ATFolder.manage_afterAdd(self, *args, **kwargs)
        self.syncResults('add')
        return retVal
开发者ID:FvD,项目名称:ECQuiz,代码行数:11,代码来源:ECQFolder.py

示例3: manage_afterAdd

# 需要导入模块: from Products.ATContentTypes.content.folder import ATFolder [as 别名]
# 或者: from Products.ATContentTypes.content.folder.ATFolder import manage_afterAdd [as 别名]
    def manage_afterAdd(self, item, container):
        #BaseFolder.manage_afterAdd(self, item, container)
        #OrderedBaseFolder.manage_afterAdd(self, item, container)
        ATFolder.manage_afterAdd(self, item, container)

        # Create a user-defined role "ECAssignment Viewer".  This role
        # has the View permission in certain states (defined in
        # ECAssignmentWorkflow).  This can be used for model
        # solutions: (1) Submit an assignment with the model
        # solution. (2) Use the "Sharing" tab to assign the role
        # "ECAssignment Viewer" to the users or groups who should be
        # allowed to view the assignment.
        #if 'ECAssignment Viewer' not in self.valid_roles():
        #    self.manage_defined_roles('Add Role',
        #                              {'role': 'ECAssignment Viewer'})

        # Create a user-defined role "ECAssignment Grader".  The owner
        # of an assignment box can use this role to delegate grading
        # to other users.
        #if 'ECAssignment Grader' not in self.valid_roles():
        #    self.manage_defined_roles('Add Role',
        #                              {'role': 'ECAssignment Grader'})

        # Plone 3: in profiles/default/rolemap.xml
        # Grant the GradeAssignments permission to the "ECAssignment
        # Grader" role.
        # self.manage_permission(permissions.GradeAssignments,
        #                       roles=['ECAssignment Grader',], acquire=True)
        
        # Assign the local roles to the creator
        creator = self.Creator()
        roles = list(self.get_local_roles_for_userid(creator))
        
        for role in ('ECAssignment Viewer', 'ECAssignment Grader'):
            if role not in roles:
                roles.append(role)
        
        self.manage_setLocalRoles(creator, roles)
开发者ID:collective,项目名称:ECAssignmentBox,代码行数:40,代码来源:ECAssignmentBox.py

示例4: manage_afterAdd

# 需要导入模块: from Products.ATContentTypes.content.folder import ATFolder [as 别名]
# 或者: from Products.ATContentTypes.content.folder.ATFolder import manage_afterAdd [as 别名]
 def manage_afterAdd(self, item, container):
     ATFolder.manage_afterAdd(self, item, container)
开发者ID:collective,项目名称:Products.PressRoom,代码行数:4,代码来源:PressRoom.py


注:本文中的Products.ATContentTypes.content.folder.ATFolder.manage_afterAdd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。