Logo Search packages:      
Sourcecode: zope-photo version File versions

def zope-photo-1.2.3::Photo::Photo::manage_afterAdd (   self,
  item,
  container 
)

Handle pasting of new photos.

Definition at line 614 of file Photo.py.

00614                                               :
        """Handle pasting of new photos."""
        if not hasattr(self, '_original'):
            # Added Photo (vs. imported)
            # See note in PUT()
            store = self.propertysheets.get('photoconf').getProperty('store')
            if store == 'Image': from PhotoImage import PhotoImage
            elif store == 'ExtImage': from ExtPhotoImage import PhotoImage
            self._original = PhotoImage(self.id, self.title, path=self.absolute_url(1))
            self._original.manage_upload(StringIO(self._data), self.content_type())
            delattr(self, '_data')
            if self._validImage():
                self._makeDisplayPhotos()

        self._original.manage_afterAdd(item, container)
        if hasattr(self, '_photos'):
            for photo in self._photos.values():
                photo.manage_afterAdd(item, container)

    def manage_beforeDelete(self, item, container):


Generated by  Doxygen 1.6.0   Back to index