Beispiel #1
0
    def __init__(self):

        PersistentMapping.__init__(self)

        self.blogs = IOBTree()
        self.categories = Categories()
        self.tags = Tags()
Beispiel #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
Beispiel #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 = []
Beispiel #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
Beispiel #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)
Beispiel #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
Beispiel #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'],)
Beispiel #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())
Beispiel #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'],
     )
Beispiel #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)
Beispiel #11
0
 def __init__(self, family=None):
     PersistentMapping.__init__(self)
     if family is not None:
         self.family = family
Beispiel #12
0
 def __init__(self):
     PersistentMapping.__init__(self)
     Contacts(self)
     Projects(self)
     Users(self)
Beispiel #13
0
 def __init__(self, title):
     PersistentMapping.__init__(self)
     self.title = title
Beispiel #14
0
 def __init__(self, family=None):
     PersistentMapping.__init__(self)
     if family is not None:
         self.family = family
Beispiel #15
0
 def __init__(self, body):
     PersistentMapping.__init__(self)
     self.body = body
Beispiel #16
0
 def __init__(self, victors, prisoners, awards, event='battle'):
     PersistentMapping.__init__(self, event=event, victors=victors,
                   prisoners=prisoners, awards=awards)
Beispiel #17
0
 def __init__(self, num, result):
     PersistentMapping.__init__(self, num=num, result=result, when=now())
Beispiel #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)
Beispiel #19
0
 def __init__(self, event, kwargs):
     PersistentMapping.__init__(self, event, **kwargs)
Beispiel #20
0
 def __init__(self, *args, **kw):
     PersistentMapping.__init__(self, *args, **kw)
     self._by_rev_index = {}
Beispiel #21
0
 def __init__(self, crumb_name):
     PersistentMapping.__init__(self)
     # Name used in breadcrumps
     self.crumb_name = crumb_name
Beispiel #22
0
 def __init__(self):
     PersistentMapping.__init__(self)
     self[DEFAULT] = DefaultViewletsForType()
Beispiel #23
0
 def __init__(self):
     PersistentMapping.__init__(self)
     Contacts(self)
     Projects(self)
     Users(self)
Beispiel #24
0
 def __init__(self, num, result):
     PersistentMapping.__init__(self, num=num, result=result, when=now())
Beispiel #25
0
 def __init__(self, crumb_name):
     PersistentMapping.__init__(self)
     # Name used in breadcrumps
     self.crumb_name = crumb_name
Beispiel #26
0
 def __init__(self, victors, prisoners, awards, event='battle'):
     PersistentMapping.__init__(self,
                                event=event,
                                victors=victors,
                                prisoners=prisoners,
                                awards=awards)
Beispiel #27
0
 def __init__(self):
     PersistentMapping.__init__(self)
Beispiel #28
0
 def __init__(self, d=None):
     # _ct is creation time
     self._ct = time.time()
     PersistentMapping.__init__(self, d)
Beispiel #29
0
 def __init__(self, parent, name):
     PersistentMapping.__init__(self)
     self.__parent__ = parent
     self.__name__ = name
     self.__parent__[name] = self
Beispiel #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())
Beispiel #31
0
 def __init__(self, name):
     PersistentMapping.__init__(self)
     self.__name__ = name
     self.id = name
     self.name = name
Beispiel #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()
Beispiel #34
0
 def __init__(self, title):
     PersistentMapping.__init__(self)
     self.title = title
Beispiel #35
0
 def __init__(self, d=None):
     # _ct is creation time
     self._ct = time.time()
     PersistentMapping.__init__(self, d)