Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3636)  |  Call(2316)  |  Derive(0)  |  Import(1320)
aq_base(ob) -- Get the object unwrapped

src/f/t/ftw.publisher.example-1.0/ftw/publisher/example/utils.py   ftw.publisher.example(Download)
from Acquisition import aq_parent, aq_inner, aq_base
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.interfaces import IPloneSiteRoot
from Products.statusmessages.interfaces import IStatusMessage
from ftw.publisher.example import _
        return True
    if checkId and getattr(obj, 'getId', None):
        if getattr(aq_base(parent), obj.getId(), None) is None:
            return True
    isTemporary = getattr(obj, 'isTemporary', None)

src/p/r/Products.ExternalStorage-0.8.1/Products/ExternalStorage/example/ExternalExample/ExternalImage.py   Products.ExternalStorage(Download)
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from ComputedAttribute import ComputedAttribute
 
from Products.CMFCore.permissions import View
    def get_size(self):
        """ZMI / Plone get size method
        """
        img = self.getImage()
        if not getattr(aq_base(img), 'get_size', False):

src/z/o/Zope2-2.13.22/src/OFS/Cache.py   Zope2(Download)
from AccessControl.unauthorized import Unauthorized
from Acquisition import aq_acquire
from Acquisition import aq_base
from Acquisition import aq_get
from Acquisition import aq_inner
def isCacheable(ob):
    return getattr(aq_base(ob), '_isCacheable', 0)
 
def managersExist(ob):
    # Returns 1 if any CacheManagers exist in the context of ob.
    in the list of cache managers.
    '''
    if (hasattr(aq_base(container), ZCM_MANAGERS) and
        name in getattr(container, ZCM_MANAGERS)):
        return 1
            # We have a volatile reference to the cache.
            if self._v_ZCacheable_manager_timestamp == manager_timestamp:
                return aq_base(c)
        manager = self.ZCacheable_getManager()
        if manager is not None:
            c = aq_base(manager.ZCacheManager_getCache())

src/z/o/Zope-HEAD/src/OFS/Cache.py   Zope(Download)
from AccessControl.unauthorized import Unauthorized
from Acquisition import aq_acquire
from Acquisition import aq_base
from Acquisition import aq_get
from Acquisition import aq_inner
def isCacheable(ob):
    return getattr(aq_base(ob), '_isCacheable', 0)
 
def managersExist(ob):
    # Returns 1 if any CacheManagers exist in the context of ob.
    in the list of cache managers.
    '''
    if (hasattr(aq_base(container), ZCM_MANAGERS) and
        name in getattr(container, ZCM_MANAGERS)):
        return 1
            # We have a volatile reference to the cache.
            if self._v_ZCacheable_manager_timestamp == manager_timestamp:
                return aq_base(c)
        manager = self.ZCacheable_getManager()
        if manager is not None:
            c = aq_base(manager.ZCacheManager_getCache())

src/z/o/Zope2-2.13.22/src/OFS/SimpleItem.py   Zope2(Download)
from Acquisition import Acquired
from Acquisition import aq_acquire
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
                          'error_log_url': error_log_url}
 
                if getattr(aq_base(s), 'isDocTemp', 0):
                    v = s(client, REQUEST, **kwargs)
                elif callable(s):
        mode=0100000
 
        if (hasattr(aq_base(self),'manage_FTPget')):
            try:
                if getSecurityManager().validate(
 
        # check write permissions
        if hasattr(aq_base(self),'PUT'):
            try:
                if getSecurityManager().validate(None, self, 'PUT', self.PUT):
 
        # get size
        if hasattr(aq_base(self), 'get_size'):
            size=self.get_size()
        elif hasattr(aq_base(self),'manage_FTPget'):

src/z/o/Zope-HEAD/src/OFS/SimpleItem.py   Zope(Download)
from Acquisition import Acquired
from Acquisition import aq_acquire
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
                          'error_log_url': error_log_url}
 
                if getattr(aq_base(s), 'isDocTemp', 0):
                    v = s(client, REQUEST, **kwargs)
                elif callable(s):
        mode=0100000
 
        if (hasattr(aq_base(self),'manage_FTPget')):
            try:
                if getSecurityManager().validate(
 
        # check write permissions
        if hasattr(aq_base(self),'PUT'):
            try:
                if getSecurityManager().validate(None, self, 'PUT', self.PUT):
 
        # get size
        if hasattr(aq_base(self), 'get_size'):
            size=self.get_size()
        elif hasattr(aq_base(self),'manage_FTPget'):

src/z/o/Zope2-2.13.22/src/OFS/Traversable.py   Zope2(Download)
from Acquisition import Acquired
from Acquisition import aq_acquire
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
                                next = bobo_traverse(REQUEST, name)
                                if restricted:
                                    if aq_base(next) is not next:
                                        # The object is wrapped, so the acquisition
                                        # context is the container.
                                        # is the container
                                        container = next.im_self
                                    elif getattr(aq_base(obj), name, _marker) is next:
                                        # Unwrapped direct attribute of the object so
                                        # object is the container
                            bobo_traverse = None
                        if next is UseTraversalDefault:
                            if getattr(aq_base(obj), name, _marker) is not _marker:
                                if restricted:
                                    next = guarded_getattr(obj, name)

src/z/o/Zope-HEAD/src/OFS/Traversable.py   Zope(Download)
from Acquisition import Acquired
from Acquisition import aq_acquire
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
                                next = bobo_traverse(REQUEST, name)
                                if restricted:
                                    if aq_base(next) is not next:
                                        # The object is wrapped, so the acquisition
                                        # context is the container.
                                        # is the container
                                        container = next.im_self
                                    elif getattr(aq_base(obj), name, _marker) is next:
                                        # Unwrapped direct attribute of the object so
                                        # object is the container
                            bobo_traverse = None
                        if next is UseTraversalDefault:
                            if getattr(aq_base(obj), name, _marker) is not _marker:
                                if restricted:
                                    next = guarded_getattr(obj, name)

src/p/l/plone.app.portlets-3.0.1/plone/app/portlets/portlets/navigation.py   plone.app.portlets(Download)
from Acquisition import aq_inner, aq_base, aq_parent
from ComputedAttribute import ComputedAttribute
from plone.app.layout.navigation.defaultpage import isDefaultPage
from plone.app.layout.navigation.interfaces import INavigationQueryBuilder
from plone.app.layout.navigation.interfaces import INavigationRoot
    def root_item_class(self):
        context = aq_inner(self.context)
        root = self.getNavRoot()
        container = aq_parent(context)
        if (aq_base(root) is aq_base(context) or
                (aq_base(root) is aq_base(container) and

src/p/l/plone.app.portlets-HEAD/plone/app/portlets/portlets/navigation.py   plone.app.portlets(Download)
from Acquisition import aq_inner, aq_base, aq_parent
from ComputedAttribute import ComputedAttribute
from plone.app.layout.navigation.defaultpage import isDefaultPage
from plone.app.layout.navigation.interfaces import INavigationQueryBuilder
from plone.app.layout.navigation.interfaces import INavigationRoot
    def root_item_class(self):
        context = aq_inner(self.context)
        root = self.getNavRoot()
        container = aq_parent(context)
        if (aq_base(root) is aq_base(context) or
                (aq_base(root) is aq_base(container) and

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next