Ejemplo n.º 1
0
 def __init__(self, site, stream, id, modifiers=[]):
     '''site      - see Brick
        stream    - stream in which this item is defined
        id        - item id
        dbValues  - optional initial values '''
     Brick.__init__(self, site, id)
     # XXX A bit ugly, but there is no better solution now.  Looking forward
     # callback argument of weakref.proxy().
     if stream.tag is None:
         self.stream = qUtils.createWeakProxy(stream)
     else:
         self.stream = stream
     self.permissions = stream.permissions
     for modifier in modifiers:
         modifier(self)
Ejemplo n.º 2
0
 def __init__(self, site, id=None):
     '''site      - site object collection almost all configuration
        id        - id of object (same as stream_id for stream.'''
     self.id = id
     self.site = qUtils.createWeakProxy(site)
     self.dbConn = site.dbConn