예제 #1
0
 def __of__(self, parent):
     m = getattr(self, methodattr)
     m = self.__dict__[methodattr]
     wrapper = getattr(m, '_permissionMapper', None)
     if wrapper is None: wrapper = PermissionMapper()
     if hasattr(m, '__of__'): return aqwrap(m, wrapper, parent)
     return m
예제 #2
0
파일: Method.py 프로젝트: wpjunior/proled
 def __of__(self, parent):
     m=getattr(self, methodattr)
     m=self.__dict__[methodattr]
     wrapper=getattr(m, '_permissionMapper', None)
     if wrapper is None: wrapper=PermissionMapper()
     if hasattr(m,'__of__'): return aqwrap(m, wrapper, parent)
     return m
예제 #3
0
    def __getattr__(self, name):
        p = self.__dict__['_product']
        d = p.__dict__
        if hasattr(p, name) and d.has_key(name):
            m = d[name]
            w = getattr(m, '_permissionMapper', None)
            if w is not None:
                m = aqwrap(m, aq_base(w), self)

            return m

        # Waaa
        m = 'Products.%s' % p.id
        if sys.modules.has_key(m) and sys.modules[m]._m.has_key(name):
            return sys.modules[m]._m[name]

        raise AttributeError, name
예제 #4
0
    def __getattr__(self, name):
        p=self.__dict__['_product']
        d=p.__dict__
        if hasattr(p,name) and name in d:
            m=d[name]
            w=getattr(m, '_permissionMapper', None)
            if w is not None:
                m=aqwrap(m, aq_base(w), self)

            return m

        # Waaa
        m = 'Products.%s' % p.id
        if m in sys.modules and sys.modules[m]._m.has_key(name):
            return sys.modules[m]._m[name]

        raise AttributeError, name
예제 #5
0
 def __of__(self, parent):
     m = getattr(self, methodattr)
     m = self.__dict__[methodattr]
     if hasattr(m, '__of__'): return aqwrap(m, self, parent)
     return m
예제 #6
0
파일: Method.py 프로젝트: wpjunior/proled
 def __of__(self, parent):
     m=getattr(self, methodattr)
     m=self.__dict__[methodattr]
     if hasattr(m,'__of__'): return aqwrap(m, self, parent)
     return m