Пример #1
0
class Project(Base):
    def __init__(self, name='', **kw):
        self.values = Values()
        self.manager = ManagerPattern(project=self)
        Base.__init__(self, name, class_item=Table, **kw)

    def add(self, name, **kw):
        if 'common' in kw:
            pattern = self.manager.get(kw.get('common'))
        else:
            pattern = Pattern(project=self, **kw)
        return Base.add(self, name, pattern=pattern)

    def stats(self):
        return Base.stats(self, {'table': self.length()})

    def data(self):
        return {'table': Base.data(self), 'values': dict(self.values)}
Пример #2
0
class Project(Base):

    def __init__(self, name='', **kw):
        self.values = Values()
        self.manager = ManagerPattern(project=self)
        Base.__init__(self, name, class_item=Table, **kw)

    def add(self, name, **kw):
        if 'common' in kw:
            pattern = self.manager.get(kw.get('common'))
        else:
            pattern = Pattern(project=self, **kw)
        return Base.add(self, name, pattern=pattern)

    def stats(self):
        return Base.stats(self, {'table': self.length()})

    def data(self):
        return {'table': Base.data(self), 'values': dict(self.values)}
Пример #3
0
 def __init__(self, name='', **kw):
     self.values = Values()
     self.manager = ManagerPattern(project=self)
     Base.__init__(self, name, class_item=Table, **kw)
Пример #4
0
 def __init__(self, name='', **kw):
     self.values = Values()
     self.manager = ManagerPattern(project=self)
     Base.__init__(self, name, class_item=Table, **kw)