示例#1
0
文件: models.py 项目: gliheng/Mojo
    def __init__(self):

        PersistentMapping.__init__(self)

        self.blogs = IOBTree()
        self.categories = Categories()
        self.tags = Tags()
示例#2
0
 def __init__(self, key, proxy):
     PersistentMapping.__init__(self)
     self._p_oid = hash(key)
     self._p_jar = self  # we are our own data manager
     self._p_key = key
     self._p_proxy = proxy
     self._p_joined = False
示例#3
0
    def __init__(self, content_id, data=None, **kwargs):

        if not data:
            data = {}

        PersistentMapping.__init__(self)
        Base.__init__(self, content_id, data=data)
        self._order = []
示例#4
0
    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
示例#5
0
    def __init__(self, id, title, config):
        PersistentMapping.__init__(self)
        self.title = title
        self.id = id
        self.set_config(config)

        # Import here to avoid import dependencies loop
        from ulearnhub.models.services import ServicesContainer
        self.services = ServicesContainer(self)
示例#6
0
    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
示例#7
0
 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'],)
示例#8
0
 def __init__(self,
              unit=None,
              type='pass',
              target=None,
              when=None,
              num=None):
     PersistentMapping.__init__(self,
                                unit=unit,
                                type=type,
                                target=target,
                                num=num,
                                when=now())
示例#9
0
 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'],
     )
示例#10
0
 def __init__(self,
              num=1,
              pass_count=0,
              hp_count=0,
              old_defsquad_hp=0,
              queued=PersistentMapping(),
              locs=PersistentMapping(),
              HPs=PersistentMapping(),
              game_over=False):
     PersistentMapping.__init__(self,
                                num=num,
                                pass_count=pass_count,
                                hp_count=hp_count,
                                old_defsquad_hp=old_defsquad_hp,
                                queued=queued,
                                locs=locs,
                                HPs=HPs,
                                game_over=game_over)
示例#11
0
 def __init__(self, family=None):
     PersistentMapping.__init__(self)
     if family is not None:
         self.family = family
示例#12
0
 def __init__(self):
     PersistentMapping.__init__(self)
     Contacts(self)
     Projects(self)
     Users(self)
示例#13
0
 def __init__(self, title):
     PersistentMapping.__init__(self)
     self.title = title
示例#14
0
 def __init__(self, family=None):
     PersistentMapping.__init__(self)
     if family is not None:
         self.family = family
示例#15
0
 def __init__(self, body):
     PersistentMapping.__init__(self)
     self.body = body
示例#16
0
 def __init__(self, victors, prisoners, awards, event='battle'):
     PersistentMapping.__init__(self, event=event, victors=victors,
                   prisoners=prisoners, awards=awards)
示例#17
0
 def __init__(self, num, result):
     PersistentMapping.__init__(self, num=num, result=result, when=now())
示例#18
0
 def __init__(self, num=1, pass_count=0, hp_count=0, old_defsquad_hp=0, queued=PersistentMapping(), locs=PersistentMapping(), HPs=PersistentMapping(), game_over=False):
     PersistentMapping.__init__(self, num=num, pass_count=pass_count,
                   hp_count=hp_count, old_defsquad_hp=old_defsquad_hp,
                   queued=queued, locs=locs, HPs=HPs, game_over=game_over)
示例#19
0
 def __init__(self, event, kwargs):
     PersistentMapping.__init__(self, event, **kwargs)
示例#20
0
文件: mutable.py 项目: drdivano/test
 def __init__(self, *args, **kw):
     PersistentMapping.__init__(self, *args, **kw)
     self._by_rev_index = {}
示例#21
0
 def __init__(self, crumb_name):
     PersistentMapping.__init__(self)
     # Name used in breadcrumps
     self.crumb_name = crumb_name
示例#22
0
 def __init__(self):
     PersistentMapping.__init__(self)
     self[DEFAULT] = DefaultViewletsForType()
示例#23
0
 def __init__(self):
     PersistentMapping.__init__(self)
     Contacts(self)
     Projects(self)
     Users(self)
示例#24
0
 def __init__(self, num, result):
     PersistentMapping.__init__(self, num=num, result=result, when=now())
示例#25
0
 def __init__(self, crumb_name):
     PersistentMapping.__init__(self)
     # Name used in breadcrumps
     self.crumb_name = crumb_name
示例#26
0
 def __init__(self, victors, prisoners, awards, event='battle'):
     PersistentMapping.__init__(self,
                                event=event,
                                victors=victors,
                                prisoners=prisoners,
                                awards=awards)
示例#27
0
 def __init__(self):
     PersistentMapping.__init__(self)
示例#28
0
 def __init__(self, d=None):
     # _ct is creation time
     self._ct = time.time()
     PersistentMapping.__init__(self, d)
示例#29
0
 def __init__(self, parent, name):
     PersistentMapping.__init__(self)
     self.__parent__ = parent
     self.__name__ = name
     self.__parent__[name] = self
示例#30
0
 def __init__(self, unit=None, type='pass', target=None, when=None, num=None):
     PersistentMapping.__init__(self, unit=unit, type=type, target=target, num=num, 
                   when=now())
示例#31
0
 def __init__(self, name):
     PersistentMapping.__init__(self)
     self.__name__ = name
     self.id = name
     self.name = name
示例#32
0
 def __init__(self, event, kwargs):
     PersistentMapping.__init__(self, event, **kwargs)
 def __init__(self, dict=None):
     self._keys = []
     BaseDict.__init__(self, dict)
     if dict is not None:
         self._keys = self.data.keys()
示例#34
0
 def __init__(self, title):
     PersistentMapping.__init__(self)
     self.title = title
示例#35
0
 def __init__(self, d=None):
     # _ct is creation time
     self._ct = time.time()
     PersistentMapping.__init__(self, d)