Logo Search packages:      
Sourcecode: zope-attachmentfield version File versions  Download package

def AttachmentField::AttachmentField::AttachmentField::getIndexableValue (   self,
  instance 
)

getIndexableValue(self, instance) => Return the value we have to index

Definition at line 209 of file AttachmentField.py.

00209                                          :
        """
        getIndexableValue(self, instance) => Return the value we have to index
        """
        # Emptyness check
        if self.isEmpty(instance):
            return ""

        # Is the indexing up-to-date ?
        name = self.getName()
        if not getattr(instance, _indexed_ % name, None):
            handler = self._getHandler(instance)
            try:
                idx = handler.getIndexableValue(self, instance)
            except:
                self._logException(instance)
                idx = None
            setattr(instance, _indexed_ % name, idx)

        # Return the index
        ret = getattr(instance, _indexed_ % name, None)
        return ret

    def isIndexed(self, instance):


Generated by  Doxygen 1.6.0   Back to index