Did I find the right examples for you? yes no

All Samples(22)  |  Call(22)  |  Derive(0)  |  Import(0)
Test whether an interface is implemented by the specification

src/s/i/silva.core.upgrade-3.0.2/src/silva/core/upgrade/upgrader/upgrade_230.py   silva.core.upgrade(Download)
            return url, None, fragment
    target = aq_inner(target)
    if not ISilvaObject.providedBy(target):
        logger.error(
            u'%s %s did not resolve to a Silva content in %s',
                return ghost
            target = aq_inner(target)
            if not ISilvaObject.providedBy(target):
                logger.error(
                    u'Ghost target is not a Silva object for: %s.',
                    content_path(ghost), '/'.join(target_path))
                return ghost
            if target is not None and ISilvaObject.providedBy(target):
                logger.info(
                    u'Upgrading Ghost target for: %s.',

src/s/i/silva.core.references-3.0.4/src/silva/core/references/widgets/formulator.py   silva.core.references(Download)
            except ValueError:
                self.raise_error('invalid_value', field)
            if ISilvaObject.providedBy(content):
                return content
            return None
            assert isinstance(value, list)
        else:
            assert ISilvaObject.providedBy(value)
            value = [value]
 

src/s/i/silva.core.upgrade-3.0.2/src/silva/core/upgrade/upgrader/upgrade_220.py   silva.core.upgrade(Download)
    def validate(self, content):
        if not (interfaces.ISilvaObject.providedBy(content) or
                interfaces.IVersion.providedBy(content)):
            return False
        annotations = getattr(aq_base(content), '_portal_annotations_', None)

src/s/i/silva.core.references-3.0.4/src/silva/core/references/widgets/__init__.py   silva.core.references(Download)
def get_lookup_content(content):
    if IVersion.providedBy(content):
        content = content.get_silva_object()
    if (ISilvaObject.providedBy(content) and
        not IContainer.providedBy(content)):

src/s/i/silva.core.upgrade-3.0.2/src/silva/core/upgrade/command.py   silva.core.upgrade(Download)
                logger.error('Invalid content path %s.', target_path)
                exit(1)
        if not ISilvaObject.providedBy(target):
            logger.error('Content %s is not a Silva content.', target_path)
            exit(2)

src/s/i/silva.core.references-3.0.4/src/silva/core/references/graph.py   silva.core.references(Download)
    else:
        zope_id = content.getId()
    if interfaces.ISilvaObject.providedBy(content) or\
            interfaces.IVersion.providedBy(content):
        title = content.get_title_or_id()

src/s/i/silva.core.conf-3.0.3/src/silva/core/conf/schema.py   silva.core.conf(Download)
    def _validate(self, value):
        super(ID, self)._validate(value)
        if self.context:
            context = self.context
            if IVersion.providedBy(context) or ISilvaObject.providedBy(context):

src/s/i/silva.ui-3.0.3/src/silva/ui/rest/base.py   silva.ui(Download)
    def __init__(self, screen):
        # Follow Zope 2 information to appear in the undo log.
        note = []
        if (ISilvaObject.providedBy(screen.context) or
                IVersion.providedBy(screen.context)):

src/z/e/zeam.form.silva-2.0.5/src/zeam/form/silva/widgets/id.py   zeam.form.silva(Download)
    def getValidationContext(self, context):
        # Return the context object to pass to the ID validator
        if ISilvaObject.providedBy(context):
            return context.get_container()
        return context

src/s/i/silva.pas.base-3.0.4/src/silva/pas/base/plugins/cookie.py   silva.pas.base(Download)
    def _get_login_page(self, request):
        parent = request.PARENTS and request.PARENTS[0] or None
        if ISilvaObject.providedBy(parent):
            root = parent.get_publication()
        else:

  1 | 2  Next