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

def AttachmentField::AttachmentField::AttachmentField::get (   self,
  instance,
  mimetype = None,
  kwargs 
)

Get value. If mime_type is 'text/plain', we retreive the
indexed string. If it's text/html, we get the preview back.

Definition at line 126 of file AttachmentField.py.

00126                                                       :
        """Get value. If mime_type is 'text/plain', we retreive the
        indexed string. If it's text/html, we get the preview back.
        """
        if mimetype == 'text/plain':
            return self.getIndexableValue(instance)
        if mimetype == 'text/html':
            return self.getPreview(instance)
        kwargs.update({'mimetype': mimetype})
        return Field.FileField.get(self, instance, **kwargs)

    def set(self, instance, value, **kwargs):


Generated by  Doxygen 1.6.0   Back to index