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

def zope-photo-1.2.4::PhotoFolder::PhotoFolder::PUT_factory (   self,

Create Photo objects by default for image types.

Definition at line 307 of file PhotoFolder.py.

00307                                           :
        """Create Photo objects by default for image types."""
        if typ[:6] == 'image/':
            store = self.propertysheets.get('photoconf').getProperty('store')
            photo = Photo(name, '', '', store=store)

            # Init properties with defaults
            props = self.propertysheets.get('photos')
            for propid, value in props.propertyItems():
                try: photo.manage_addProperty(propid, value, props.getPropertyType(propid))
                except: pass

            # Init settings with defaults
            photoconf = self.propertysheets.get('photoconf')
            settings = {}
            for propid, value in photoconf.propertyItems():
                settings[propid] = value

            # Init displays with defaults
            photo._displays = self._displays.copy()
            return photo

        return None

# Factory methods

manage_addPhotoFolderForm = DTMLFile('dtml/addPhotoFolderForm', globals())

Generated by  Doxygen 1.6.0   Back to index