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


Python PortalContent.PortalContent类代码示例

本文整理汇总了Python中Products.CMFCore.PortalContent.PortalContent的典型用法代码示例。如果您正苦于以下问题:Python PortalContent类的具体用法?Python PortalContent怎么用?Python PortalContent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: _initContent

    def _initContent(self, folder, id):
        from Products.CMFCore.PortalContent import PortalContent

        c = PortalContent()
        c._setId(id)
        c.meta_type = 'File'
        folder._setObject(id, c)
        return folder._getOb(id)
开发者ID:goschtl,项目名称:zope,代码行数:8,代码来源:test_PortalContent.py

示例2: test_patch_undeserializable_object_returns_501

    def test_patch_undeserializable_object_returns_501(self):
        obj = PortalContent()
        obj.id = 'obj1'
        obj.portal_type = 'Undeserializable Type'
        self.portal._setObject(obj.id, obj)
        transaction.commit()

        response = requests.patch(
            self.portal.obj1.absolute_url(),
            headers={'Accept': 'application/json'},
            auth=(SITE_OWNER_NAME, SITE_OWNER_PASSWORD),
            data='{"id": "patched_obj1"}',
        )
        self.assertEqual(501, response.status_code)
        self.assertIn('Undeserializable Type', response.text)
开发者ID:casdr,项目名称:plone.restapi,代码行数:15,代码来源:test_content_patch.py

示例3: manage_beforeDelete

 def manage_beforeDelete( self, item, container ):
     self.before_delete_called = 1
     if self.catalog:
         PortalContent.manage_beforeDelete( self, item, container )
开发者ID:goschtl,项目名称:zope,代码行数:4,代码来源:dummy.py

示例4: manage_afterAdd

 def manage_afterAdd( self, item, container ):
     self.after_add_called = 1
     if self.catalog:
         PortalContent.manage_afterAdd( self, item, container )
开发者ID:goschtl,项目名称:zope,代码行数:4,代码来源:dummy.py

示例5: manage_beforeDelete

 def manage_beforeDelete(self, item, container):
     """Both of my parents have a beforeDelete method"""
     PortalContent.manage_beforeDelete(self, item, container)
     OFS.Image.File.manage_beforeDelete(self, item, container)
开发者ID:goschtl,项目名称:zope,代码行数:4,代码来源:File.py

示例6: manage_afterClone

 def manage_afterClone(self, item):
     """Both of my parents have an afterClone method"""
     OFS.Image.File.manage_afterClone(self, item)
     PortalContent.manage_afterClone(self, item)
开发者ID:goschtl,项目名称:zope,代码行数:4,代码来源:File.py

示例7: manage_afterAdd

 def manage_afterAdd(self, item, container):
     """Both of my parents have an afterAdd method"""
     OFS.Image.File.manage_afterAdd(self, item, container)
     PortalContent.manage_afterAdd(self, item, container)
开发者ID:goschtl,项目名称:zope,代码行数:4,代码来源:File.py

示例8: manage_afterClone

 def manage_afterClone(self, item):
     PortalContent.manage_afterClone(self, item)
     self.uid = self.make_uuid(id)
开发者ID:a25kk,项目名称:stv2,代码行数:3,代码来源:PlonePopoll.py

示例9: manage_afterAdd

 def manage_afterAdd(self, item, container):
      """ Add self to the workflow and catalog. """
      PortalFolder.manage_afterAdd(self, item, container)
      PortalContent.manage_afterAdd(self, item, container)
开发者ID:BackupTheBerlios,项目名称:plonenewsletter,代码行数:4,代码来源:Newsletter.py

示例10: manage_afterAdd

 def manage_afterAdd(self, item, container):
     " Add self to the workflow and catalog. "
     # Recurse in the children (ObjectManager)
     PortalFolder.manage_afterAdd(self, item, container)
     # Add self to workflow and catalog
     PortalContent.manage_afterAdd(self, item, container)
开发者ID:BackupTheBerlios,项目名称:plonenewsletter,代码行数:6,代码来源:Publication.py


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