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


Python PersistentMapping.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
    def __init__(self):

        PersistentMapping.__init__(self)

        self.blogs = IOBTree()
        self.categories = Categories()
        self.tags = Tags()
开发者ID:gliheng,项目名称:Mojo,代码行数:9,代码来源:models.py

示例2: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
    def __init__(self, content_id, data=None, **kwargs):

        if not data:
            data = {}

        PersistentMapping.__init__(self)
        Base.__init__(self, content_id, data=data)
        self._order = []
开发者ID:,项目名称:,代码行数:10,代码来源:

示例3: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
    def __init__(self, crumb_name, owner, id):
        PersistentMapping.__init__(self)
        self.item_number = 0
        self.timestamp = datetime.now()
        self.id = id
        self.owner = owner

        # Name used in breadcrumps
        self.crumb_name = crumb_name
开发者ID:tojuhaka,项目名称:easyblog,代码行数:11,代码来源:models.py

示例4: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self, log):
     #self.start_time = log['start_time']
     #self.players    = log['players']
     #self.units      = log['units']
     #self.grid       = log['grid']
     #self['init_locs']  = log['init_locs']
     PersistentMapping.__init__(self, init_locs=log['init_locs'],
                         start_time=log['start_time'],
                         units=log['units'],
                         grid=log['grid'],
                         owners=log['owners'],)
开发者ID:jessetane,项目名称:btpy,代码行数:13,代码来源:zodb_hex_battle.py

示例5: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self, d=None):
     # _ct is creation time
     self._ct = time.time()
     PersistentMapping.__init__(self, d)
开发者ID:CipherHealth,项目名称:repoze.session,代码行数:6,代码来源:data.py

示例6: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self, family=None):
     PersistentMapping.__init__(self)
     if family is not None:
         self.family = family
开发者ID:Pylons,项目名称:hypatia,代码行数:6,代码来源:__init__.py

示例7: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self, dict=None):
     self._keys = []
     BaseDict.__init__(self, dict)
     if dict is not None:
         self._keys = self.data.keys()
开发者ID:socialplanning,项目名称:topp.utils,代码行数:7,代码来源:orderedpersistentmapping.py

示例8: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self, body):
     PersistentMapping.__init__(self)
     self.body = body
开发者ID:chrisrossi,项目名称:jove,代码行数:5,代码来源:test_functional.py

示例9: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self):
     PersistentMapping.__init__(self)
     Contacts(self)
     Projects(self)
     Users(self)
开发者ID:linuxsoftware,项目名称:djoser,代码行数:7,代码来源:app.py

示例10: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self):
     PersistentMapping.__init__(self)
     self[DEFAULT] = DefaultViewletsForType()
开发者ID:RadioFreeAsia,项目名称:Products.CompositePack,代码行数:5,代码来源:ViewletRegistry.py

示例11: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self, *args, **kw):
     PersistentMapping.__init__(self, *args, **kw)
     self._by_rev_index = {}
开发者ID:drdivano,项目名称:test,代码行数:5,代码来源:mutable.py

示例12: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self, name):
     PersistentMapping.__init__(self)
     self.__name__ = name
     self.id = name
     self.name = name
开发者ID:tojuhaka,项目名称:tojuhaka,代码行数:7,代码来源:models.py

示例13: __init__

# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
 def __init__(self, title):
     PersistentMapping.__init__(self)
     self.title = title
开发者ID:AvdN,项目名称:pyramid_tutorials,代码行数:5,代码来源:resources.py


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