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

All Samples(35)  |  Call(35)  |  Derive(0)  |  Import(0)

src/p/r/Products.AttachmentField-1.4.5/Products/AttachmentField/AttachmentHandler.py   Products.AttachmentField(Download)
    class_name = handler_class.__name__
    __HANDLERS__.append((class_name, handler, ))
    LOG.debug("Registered '%s' class.", class_name)
 
 
    """
    # Find a content type matching.
    LOG.debug("trying to find a handler for '%s'", content_type)
    handler = None
    for hnd in __HANDLERS__:
        if content_type in hnd[1].getContentTypes(field, instance):
            LOG.debug("We use %s" % hnd[1])
 
    # No match. Have to return the dummy handler
    LOG.debug("No match, we fall back to the dummy handler '%s'", dummy)
    return dummy
 
        Return the ZCatalog-indexable string for that type.
        """
        LOG.debug("converting field '%s', %s %s",
                  field.getName(), str(self.index_arguments), self.__class__.__name__)
 

src/p/r/Products.AttachmentField-1.4.5/Products/AttachmentField/OOAttachment.py   Products.AttachmentField(Download)
        Return the ZCatalog-indexable string for that type.
        """
        LOG.debug("getIndexableValue")
        content = field.get(instance)
        content_type = field.getContentType(instance)
        return None.
        """
        LOG.debug("getPreview")
        content = field.get(instance)
        content_type = field.getContentType(instance)
        using the converter stuff.
        """
        LOG.debug("convertStringToIndex...")
        cnv = oo_to_html()
        return self._html_to_text(cnv.convert_(content,), )
        using the converter stuff.
        """
        LOG.debug("convertStringToPreview...")
        cnv = oo_to_html()
        return self._convertOutput(cnv.convert_(content,), "html")

src/p/r/Products.AttachmentField-1.4.5/Products/AttachmentField/PortalTransformsAttachment.py   Products.AttachmentField(Download)
        out_encoding = out.getMetadata().get('encoding', None)
        if out_encoding:
            LOG.debug("Have encoding: '%s'" % out_encoding)
            output = unicode(output, encoding = out_encoding, )
        else:
            # Convert from encoded string to unicode
            for enc in AVAILABLE_ENCODINGS:
                try:
                    LOG.debug("Trying encoding: '%s'" % enc)
 
                except UnicodeError:
                    LOG.debug("Encoding '%s' failed" % enc)
                    pass
 
 
        if not path and requirements:
            LOG.debug('Unable to satisfy requirements %s' % (
                ', '.join(requirements), ))
            path = transform._findPath(orig_mt, target_mt)
 
        if not path:
            LOG.debug('NO PATH FROM %s TO %s : %s' % (

src/p/r/Products.AttachmentField-1.4.5/Products/AttachmentField/AttachmentField.py   Products.AttachmentField(Download)
        if not icon:
            handler = self._getHandler(instance)
            LOG.debug("getIcon for %s / %s" % (self.getFilename(instance),
                                               handler.converter_type, ))
            icon = handler.getIconFile(self, instance)

src/p/r/Products.AttachmentField-1.4.5/Products/AttachmentField/tests/test_fields.py   Products.AttachmentField(Download)
        dummy.REQUEST = request
        dummy.processForm(data=1)
        LOG.debug("dummy size after processForm: %d" % (
            dummy.Schema()['attach_doc'].get(dummy).getSize()))
        self._content = dummy
        dummy.processForm(data=1)
        for k, v in expected_values.items():
            LOG.debug(k)
            got = dummy.Schema()[k].get(dummy)
            if isinstance(got, File):
        dummy.processForm()
        for k, v in test_fields.items():
            LOG.debug(k)
            got = dummy.Schema()[k].get(dummy)
            if isinstance(got, (File, ScalableImage, Image)):