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

All Samples(2933)  |  Call(1688)  |  Derive(0)  |  Import(1245)
aq_parent(ob) -- Get the parent of an object

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 _
    Source: http://svn.plone.org/svn/collective/collective.indexing/trunk/collective/indexing/subscribers.py
    """
    parent = aq_parent(aq_inner(obj))
    if parent is None:
        return True
    if not workflow:
        # no workflow defined for this object - check the workflow of the parent
        return is_published(aq_parent(aq_inner(obj)))
 
    wf_tool = getToolByName(obj, 'portal_workflow')
    errors = []
    warnings = []
    parent = aq_parent(aq_inner(obj))
    request = obj.REQUEST
 

src/e/x/example.conference-HEAD/example/conference/session.py   example.conference(Download)
from Acquisition import aq_inner, aq_parent
from example.conference import _
from example.conference.presenter import IPresenter
from five import grok
from plone.app.textfield import RichText
    from example.conference.program import IProgram
    while context is not None and not IProgram.providedBy(context):
        context = aq_parent(aq_inner(context))
 
    values = []

src/z/o/Zope2-2.13.22/src/OFS/SimpleItem.py   Zope2(Download)
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Acquisition import Implicit
from App.Management import Tabs
            if not hasattr(ob,'aq_parent'):
                break
            ob = aq_parent(ob)
 
        stat=marshal.loads(self.manage_FTPstat(REQUEST))
            return Base.__repr__(self)
        context_path = None
        context = aq_parent(self)
        container = aq_parent(aq_inner(self))
        if aq_base(context) is not aq_base(container):
        path = (self.__name__,)
 
        p = aq_parent(aq_inner(self))
        if p is not None:
            path = p.getPhysicalPath() + path

src/z/o/Zope-HEAD/src/OFS/SimpleItem.py   Zope(Download)
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Acquisition import Implicit
from App.Management import Tabs
            if not hasattr(ob,'aq_parent'):
                break
            ob = aq_parent(ob)
 
        stat=marshal.loads(self.manage_FTPstat(REQUEST))
            return Base.__repr__(self)
        context_path = None
        context = aq_parent(self)
        container = aq_parent(aq_inner(self))
        if aq_base(context) is not aq_base(container):
        """
        path = (self.__name__, )
        p = aq_parent(aq_inner(self))
        if p is not None:
            path = p.getPhysicalPath() + path

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/BaseObject.py   Products.Archetypes(Download)
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Acquisition import ImplicitAcquisitionWrapper
from Acquisition import ExplicitAcquisitionWrapper
        value = value.strip()
        if value != self.getId():
            parent = aq_parent(aq_inner(self))
            if parent is not None:
                # See Referenceable, keep refs on what is a move/rename
        check_id = getattr(self, 'check_id', None)
        if check_id is None:
            parent = aq_parent(aq_inner(self))
            parent_ids = parent.objectIds()
            check_id = lambda id, required: id in parent_ids
    def isTemporary(self):
        """Checks to see if we are created as temporary object by
        portal factory.
        """
        parent = aq_parent(aq_inner(self))
        if not ctx.isTemporary():
            # Not a temporary object!
            return aq_parent(ctx)
        utool = getToolByName(self, 'portal_url')
        portal_object = utool.getPortalObject()

src/z/o/Zope2-2.13.22/src/Shared/DC/Scripts/Bindings.py   Zope2(Download)
from AccessControl.PermissionRole import _what_not_even_god_should_do
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import aq_parent
from Acquisition import aq_inner
from Persistence import Persistent
    def _getContext(self):
        # Utility for bindcode.
        while 1:
            self = aq_parent(self)
            if not getattr(self, '_is_wrapperish', None):
                parent = aq_parent(self)
                inner = aq_inner(self)
                container = aq_parent(inner)
    def _getContainer(self):
        # Utility for bindcode.
        while 1:
            self = aq_parent(aq_inner(self))
            if not getattr(self, '_is_wrapperish', None):

src/e/u/Euphorie-6.3.1/src/euphorie/client/publish.py   Euphorie(Download)
import datetime
import logging
from Acquisition import aq_inner
from Acquisition import aq_parent
from AccessControl.SecurityManagement import getSecurityManager
 
    source = aq_inner(survey)
    surveygroup = aq_parent(source)
    sector = aq_parent(surveygroup)
    country = aq_parent(sector)
    def is_surveygroup_published(self):
        """Check if this surveygroup has been published before."""
        source = aq_inner(self.context)
        surveygroup = aq_parent(source)
        return bool(surveygroup.published)

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/BaseObject.py   Products.Archetypes(Download)
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Acquisition import ImplicitAcquisitionWrapper
from Acquisition import ExplicitAcquisitionWrapper
        value = value.strip()
        if value != self.getId():
            parent = aq_parent(aq_inner(self))
            if parent is not None:
                # See Referenceable, keep refs on what is a move/rename
        check_id = getattr(self, 'check_id', None)
        if check_id is None:
            parent = aq_parent(aq_inner(self))
            parent_ids = parent.objectIds()
            check_id = lambda id, required: id in parent_ids
    def isTemporary(self):
        """Checks to see if we are created as temporary object by
        portal factory.
        """
        parent = aq_parent(aq_inner(self))
        if not ctx.isTemporary():
            # Not a temporary object!
            return aq_parent(ctx)
        utool = getToolByName(self, 'portal_url')
        portal_object = utool.getPortalObject()

src/z/o/Zope-HEAD/src/Shared/DC/Scripts/Bindings.py   Zope(Download)
from AccessControl.PermissionRole import _what_not_even_god_should_do
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import aq_parent
from Acquisition import aq_inner
from Persistence import Persistent
    def _getContext(self):
        # Utility for bindcode.
        while 1:
            self = aq_parent(self)
            if not getattr(self, '_is_wrapperish', None):
                parent = aq_parent(self)
                inner = aq_inner(self)
                container = aq_parent(inner)
    def _getContainer(self):
        # Utility for bindcode.
        while 1:
            self = aq_parent(aq_inner(self))
            if not getattr(self, '_is_wrapperish', None):

src/z/o/Zope2-2.13.22/src/OFS/Traversable.py   Zope2(Download)
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Acquisition.interfaces import IAcquirer
from OFS.interfaces import ITraversable
        path = (self.getId(),)
 
        p = aq_parent(aq_inner(self))
        if p is not None:
            path = p.getPhysicalPath() + path
 
                if name == '..':
                    next = aq_parent(obj)
                    if next is not None:
                        if restricted and not validate(obj, obj, name, next):
                                        # The object is wrapped, so the acquisition
                                        # context is the container.
                                        container = aq_parent(aq_inner(next))
                                    elif getattr(next, 'im_self', None) is not None:
                                        # Bound method, the bound instance

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